15 lines
254 B
Python
15 lines
254 B
Python
|
from git import Repo
|
||
|
import os
|
||
|
|
||
|
|
||
|
def getlibreticmenuBranch():
|
||
|
repo = Repo(os.getcwd())
|
||
|
branch = repo.active_branch
|
||
|
return branch.name
|
||
|
|
||
|
|
||
|
def setlibreticmenuBranch(branch):
|
||
|
repo = Repo(os.getcwd())
|
||
|
git = repo.git
|
||
|
git.switch(branch)
|