$ git push
fatal: The current branch myawesomefeature has no upstream branch.
To push the current branch and set the remote as upstream, use
git push --set-upstream origin myawesomefeature
I'm confused. That error is expected if you just issue git push. My suggestion was to use git push origin -u (instead of the longer version git push --set-upstream origin myawesomefeature).
From what I understand, I think it will only work if it was push successfully before or branch exist in remote?
ref: git-scm.com/docs/git-push#Document...
I haven't set that config, I use the default (i.e. push.default=simple). For me git push origin -u works.
Setting git config --global push.default upstream I get the same error as you.
The OP suggested to use git config --global push.default current though, which has the desired effect (i.e. git push sets the remote branch as the tracking branch).
For further actions, you may consider blocking this person and/or reporting abuse
We're a place where coders share, stay up-to-date and grow their careers.
I'm afraid that didn't work for me.
Can you elaborate a bit? What's the error message?
same as above post,
I'm confused. That error is expected if you just issue
git push
. My suggestion was to usegit push origin -u
(instead of the longer versiongit push --set-upstream origin myawesomefeature
).Sorry I've no idea, I've tried.
when
what's your config?
From what I understand, I think it will only work if it was push successfully before or branch exist in remote?
ref: git-scm.com/docs/git-push#Document...
I haven't set that config, I use the default (i.e.
push.default=simple
). For megit push origin -u
works.Setting
git config --global push.default upstream
I get the same error as you.The OP suggested to use
git config --global push.default current
though, which has the desired effect (i.e.git push
sets the remote branch as the tracking branch).