git/list[1] front-page[2] threads[3] people[4] search[5] about
 

git branch --switch?

From
RHRene Herman <rene.herman@gmail.com>
Date
Apr 17, 2007, 13:36 UTC
Message-ID
<4624CD58.90103@gmail.com>
Good day.

Is it possible to switch the current branch without checking it out? Not really essential, but I'm happily flaundering around with git and still start from scratch fairly regularly; to speed this up I've found the -n switch to git clone useful and would like something similar when reconstructing my "branch hierarchies".

Upto now I only know about "git checkout" (with or without -b) to switch the current branch. As said it's not really essential, but I was expecting there would be something like a "branch --switch". Did I overlook it?

Rene.
Next: Alex Riesen
Message 1 of 18 in “git branch --switch?”
  1. Rene HermanApr 17, 2007
  2. Alex RiesenApr 17, 2007
  3. Rene HermanApr 17, 2007
  4. Brian GernhardtApr 17, 2007
  5. Alex RiesenApr 17, 2007
  6. Rene HermanApr 17, 2007
  7. Brian GernhardtApr 17, 2007
  8. Rene HermanApr 17, 2007
  9. Rene HermanApr 17, 2007
  10. Lars HjemliApr 17, 2007
  11. Rene HermanApr 17, 2007
  12. Randal L. SchwartzApr 17, 2007
  13. Rene HermanApr 17, 2007
  14. Lars HjemliApr 17, 2007
  15. Rene HermanApr 17, 2007
  16. Rene HermanApr 17, 2007
  17. Linus TorvaldsApr 17, 2007
  18. Rene HermanApr 17, 2007

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.