Thread (3 messages) flat view 3 messages, 3 authors, 2016-06-15

Re: Bootstrapping into git, commit gripes at me

From: Junio C Hamano <hidden>
Date: 2016-06-15 22:42:02

Linus Torvalds [off-list ref] 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.
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help