Skip to content

Commit

Permalink
Fix: make sure git hf update always returns to the right branch after…
Browse files Browse the repository at this point in the history
… an update
  • Loading branch information
stuartherbert committed Apr 8, 2013
1 parent 4811bc8 commit 7530cc5
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions git-hf-update
Original file line number Diff line number Diff line change
Expand Up @@ -75,6 +75,11 @@ cmd_update() {
# fetch and merge the latest changes from origin
hubflow_merge_latest_changes_from_origin

# make sure we end up where we should be
if [[ $(git_current_branch) != $BRANCH ]] ; then
git checkout "$BRANCH"
fi

# drop any branches that have disappeared from origin
if flag prune ; then
git fetch --prune || die "Unable to prune branches that no longer exist at '$ORIGIN'"
Expand Down

0 comments on commit 7530cc5

Please sign in to comment.