Thread (4 messages) flat view 4 messages, 3 authors, 2021-07-12

RE: PATCH: improve git switch documentation

From: Kerry, Richard <hidden>
Date: 2021-07-12 10:32:14

quoted
   git branch switch
   git tag switch   // detach
   git commit switch   // detach
Why? You don't switch tags or commits. You switch only branches, 
Yes you do.
You can switch to branches, tags or commits.

If I remember correctly, "branch" is used in Subversion and CVS only for the creation of a branch.  Likewise "tag" for creating a tag.  
And I think they both use "update" to load the required branch/tag/commit into the current working area.

If git were to do that then I think we might get around some of this confusion.

In that case:
git branch = create a branch
git tag = create a tag

And then a new "update", so:
git update <branchname> = make the current working area contain a copy of the given branch, and similarly "git update <tagname>" or "git update <commit-id>"

In all these cases the keyword after "git" is definitely a verb, even where the actual word used could be either, and you need to look at all the definitions in the dictionary to check.

Regards,
Richard.

Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help