Linus Torvalds <[EMAIL PROTECTED]> writes:

> But what about the branch name? Should we just ask the user? Together with 
> a flag, like
>
>       git checkout -b new-branch v2.6.12
>
> for somebody who wants to specify the branch name? Or should we pick a 
> random name and add a helper function to rename a branch later?
>
> Opinions?

How about treating "master" a temporary thing --- "whatever I
happen to be working on right now"?

 - git branch <branch-name>       ;# copies master to branch-name;
                                     if branch-name exists in refs/heads,
                                     warn and refuse.  Override
                                     with --force flag.

 - git checkout <branch-name>     ;# copies branch-name to master; but
                                     if master does not match any
                                     of the other refs/heads/, warn
                                     and refuse.  Override with
                                     --force flag.

Yes I realize that you have to be careful when to push to your
public repository if you take this route, but this is only
relevant to people like Jeff with multiple heads, and I think he
publicly stated that his "refs/heads/master" aka .git/HEAD does
not mean much and what matters are his branch heads.  People who
do not use multiple branches but just checks out various tags,
the above would be reasonably convenient.


-
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to