Skip to content

Commit

Permalink
Merge pull request #729 from orestisf1993/patch-1
Browse files Browse the repository at this point in the history
git-rename-branch: Don't fail if remote doesn't exist
  • Loading branch information
spacewander authored Sep 13, 2018
2 parents 2590998 + 7393fb4 commit 8b992cc
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion bin/git-rename-branch
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ test -z $1 && echo "new branch name required." 1>&2 && exit 1

new_branch="$1"
old_branch="${2-$(git symbolic-ref --short -q HEAD)}"
remote=$(git config branch."$old_branch".remote)
remote=$(git config branch."$old_branch".remote; true)

git branch -m "$old_branch" "$new_branch"
# check if the branch is tracking a remote branch
Expand Down

0 comments on commit 8b992cc

Please sign in to comment.