mirror of
https://github.com/tj/git-extras.git
synced 2026-09-10 23:46:24 -04:00
Merge pull request #729 from orestisf1993/patch-1
git-rename-branch: Don't fail if remote doesn't exist
This commit is contained in:
commit
8b992cc9bc
|
|
@ -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
|
||||
|
|
|
|||
Loading…
Reference in a new issue