From c9a6cdb3b183b695984d09c9286c5c6e59e8904a Mon Sep 17 00:00:00 2001 From: Jason Karns Date: Mon, 11 Jan 2016 12:31:11 -0500 Subject: [PATCH] Ensure current branch pushes to matching on remote `git push HEAD` is documented to push current branch to same-named branch on the remote --- script/brew-publish | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/script/brew-publish b/script/brew-publish index 8710f79c..134aa655 100755 --- a/script/brew-publish +++ b/script/brew-publish @@ -46,7 +46,7 @@ rm -f "${formula}.bak" git commit -m "${brew_name} ${version#v}" -- "$formula" # hackish way of getting the git remote name for user's fork fork_remote="$(hub fork 2>&1 | grep -oE 'remote:? \S+' | tail -1 | awk '{print $2}')" -git push -u "$fork_remote" "$branch" +git push -u "$fork_remote" HEAD hub pull-request -m "${brew_name} ${version#v}" git checkout -q -