Skip to content

Commit

Permalink
Fixed #3: 'git up' didn't return to current branch
Browse files Browse the repository at this point in the history
  • Loading branch information
msiemens committed May 3, 2013
1 parent a7e048f commit 6bd3aae
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion PyGitUp/gitup.py
Original file line number Diff line number Diff line change
Expand Up @@ -205,7 +205,9 @@ def returning_to_current_branch(self):

yield

print(colored('returning to {0}'.format(branch_name), 'magenta'))
if not self.repo.head.ref.name == branch_name:
print(colored('returning to {0}'.format(branch_name), 'magenta'))
self.git.checkout(branch_name)

def config(self, key):
""" Get a git-up-specific config value. """
Expand Down

0 comments on commit 6bd3aae

Please # to comment.