I can execute "git checkout -B --track origin/TeamBranch" through terminal. but I have the requirement to implement the above command through my script using Gitpython. can someone help me with this?
Thanks in advance.
You can use git directly
git = repo.git
git.checkout('HEAD', b="TeamBranch")