From 869589aacc66c097e63bdddd55ffc8184255b3a5 Mon Sep 17 00:00:00 2001 From: Erik Martin-Dorel Date: Tue, 20 Feb 2018 18:15:52 +0100 Subject: [PATCH] Add missing HEAD argument in 2 Git commands These commands had been inserted in #148 and (over)simplified in #163. The issue is that `git push ` & `git push -u HEAD`): --8<---------------cut here---------------start------------->8--- fatal: The current branch new-branch has no upstream branch. To push the current branch and set the remote as upstream, use git push --set-upstream origin new-branch --8<---------------cut here---------------end--------------->8--- --- README.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index a2160c7d..486402dd 100644 --- a/README.md +++ b/README.md @@ -779,13 +779,13 @@ This will give you a local copy of the branch `daves`, and any update that has b ### I want to create a new remote branch from current local one ```sh -$ git push +$ git push HEAD ``` If you would also like to set that remote branch as upstream for the current one, use the following instead: ```sh -$ git push -u +$ git push -u HEAD ``` With the `upstream` mode and the `simple` (default in Git 2.0) mode of the `push.default` config, the following command will push the current branch with regards to the remote branch that has been registered previously with `-u`: