From b5442b55c7ca3399cfc6c884b8df9a93903cbecd Mon Sep 17 00:00:00 2001 From: Sami Samhuri Date: Tue, 22 Oct 2019 11:33:39 -0500 Subject: [PATCH] Use dynamic branch instead of master to get remote in git-update --- git-update | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/git-update b/git-update index 077fe3e..4b4e5bf 100755 --- a/git-update +++ b/git-update @@ -7,7 +7,7 @@ function current_branch() { } ORIG_BRANCH=$(current_branch) -DEFAULT_REMOTE=$(git config --get branch.master.remote) +DEFAULT_REMOTE=$(git config --get branch.${ORIG_BRANCH}.remote) REMOTE="${1:-$DEFAULT_REMOTE}" if [[ "$ORIG_BRANCH" = "HEAD" ]]; then echo "Cannot update in a detached HEAD state"