Re: git: using branches



On Fri, Apr 17, 2009 at 3:09 PM, Simos Xenitellis
<simos lists googlemail com> wrote:
> I suppose  there must be some story behind the question 'Why do we specify
> the branch name instead of reusing the remote branch name by default?
> It feels somewhat weird.'.
> With a big more experience we should be able to figure it out.

For ease of use, DO NOT use a different local branch name. It will
cause 'git push origin local-branch-name' (without other args) to
create a new branch on the remote side named after your local branch.
This is not what you want (and then you have to find someone to delete
your mistake). If you name the local branch exactly the same as the
remote tracking branch, 'git push' will just magically work correctly.
So ALWAYS do:

$ git checkout -b remotename origin/remotename


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]