Does anyone know if there’s a magic way to checkout the last branch in dulwich/porcelain without knowing the name of that branch.
Ie, I want the python equivelent of git checkout -
Documentation and play suggest it wants a name specifically:
porcelain.checkout_branch(repo=repo, target='-') *** KeyError: b'-'
or
porcelain.checkout_branch(repo=repo, target='@{-1}') *** KeyError: b'@{-1}'
submitted by /u/mothzilla
[link] [comments]
r/learnpython Does anyone know if there’s a magic way to checkout the last branch in dulwich/porcelain without knowing the name of that branch. Ie, I want the python equivelent of git checkout – Documentation and play suggest it wants a name specifically: porcelain.checkout_branch(repo=repo, target=’-‘) *** KeyError: b’-‘ or porcelain.checkout_branch(repo=repo, target=’@{-1}’) *** KeyError: b’@{-1}’ submitted by /u/mothzilla [link] [comments]
Does anyone know if there’s a magic way to checkout the last branch in dulwich/porcelain without knowing the name of that branch.
Ie, I want the python equivelent of git checkout -
Documentation and play suggest it wants a name specifically:
porcelain.checkout_branch(repo=repo, target='-') *** KeyError: b'-'
or
porcelain.checkout_branch(repo=repo, target='@{-1}') *** KeyError: b'@{-1}'
submitted by /u/mothzilla
[link] [comments]