Re: pushing branches
- From
Junio C Hamano <gitster@pobox.com>
- Date
- Jul 20, 2012, 15:46 UTC
- Message-ID
- <7vhat2toz8.fsf@alter.siamese.dyndns.org>
- In-Reply-To
- <CACnwZYdqP_ptj0++dj5NkCoKWKHiLEj+c0t7zrmNidkHsyzMgw@mail.gmail.com>
Thiago Farina <tfransosi@gmail.com> writes:
Show 10 quoted lines
> How can I push a working branch to github inside it? > > E.g: > > # On master: > $ git checkout -b feature-work > > # On feature-work > # vi, hack, commit, ready to push > $ git push origin master # here I expected it would working pushing my
"git push origin master" is a short-hand for "git push origin refs/heads/master:refs/heads/master" to update their master branch with what you have in your master branch.
See output from
$ git push --help
for details.
I think you are trying to update, while on your feature-work branch, their master with your feature-work branch (or more generally, the current HEAD), so
$ git push origin HEAD:master
is perhaps what you are looking for?