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

Re: [PATCH 3/3] Teach "git branch" about --new-workdir

From
Johannes Schindelin <johannes.schindelin@gmx.de>
Date
Jul 22, 2007, 23:37 UTC
Message-ID
<Pine.LNX.4.64.0707230033310.14781@racer.site>
In-Reply-To
<f80mbc$si1$1@sea.gmane.org>
Hi,
[re Cc'ed Julian]
On Mon, 23 Jul 2007, Jakub Narebski wrote:
Show 11 quoted lines
> Julian Phillips wrote:
> 
> > I just think that to a user it feels like a checkout operation ... and 
> > that would less confusing as an option to checkout. ?Trying to explain 
> > that branch just creates a new branch, unless you give this option 
> > then it creates a working copy over there seems more compilcated than 
> > saying the checkout updates/creates this working copy, unless you use 
> > this option to create one over there.
> 
> IMVHO git-checkout is characterized that it changes _current_ working 
> directory.

Actually, the name suggests that the important action is "checkout", so I agree with Julian here.

> But having this in git-checkout would mean that you can create new 
> workdir for _existing_ branch. git-branch is rather (except from 
> listing) for creating new branches.

Note that it is possible to checkout the current branch with "git checkout HEAD". Indeed, you can get the same effect with "git checkout -f HEAD" as with "git reset --hard" AFAIK.

> It is a fact that functionalities of git-checkout (-b) and git-branch
> (--new-work-dir) intersect a bit.

Yes, I pointed that out, too. But we're not Python, so we do not have to pretend that it is a bad thing to have several way to do the same. Which allows us better to cater for user's expectations.

Ciao, Dscho

Previous: Jakub NarebskiNext: Johannes Schindelin
Message 10 of 46 in “Teach "git branch" about --new-workdir”
  1. 3/3 Teach "git branch" about --new-workdirJohannes Schindelin, Jul 22, 2007
  2. Daniel BarkalowJul 22, 2007
  3. Johannes SchindelinJul 22, 2007
  4. Julian PhillipsJul 22, 2007
  5. Johannes SchindelinJul 22, 2007
  6. Julian PhillipsJul 22, 2007
  7. Johannes SchindelinJul 22, 2007
  8. Julian PhillipsJul 22, 2007
  9. Jakub NarebskiJul 22, 2007
  10. Johannes SchindelinJul 22, 2007
  11. Johannes SchindelinJul 22, 2007
  12. Shawn O. PearceJul 23, 2007
  13. Junio C HamanoJul 23, 2007
  14. Shawn O. PearceJul 23, 2007
  15. Shawn O. PearceJul 23, 2007
  16. Johannes SchindelinJul 23, 2007
  17. Johannes SchindelinJul 23, 2007
  18. Marius Storm-OlsenJul 24, 2007
  19. Johannes SchindelinJul 24, 2007
  20. Junio C HamanoJul 24, 2007
  21. Johannes SchindelinJul 24, 2007
  22. Marius Storm-OlsenJul 24, 2007
  23. Julian PhillipsJul 24, 2007
  24. Marius Storm-OlsenJul 24, 2007
  25. Johannes SchindelinJul 24, 2007
  26. Josef WeidendorferJul 24, 2007
  27. Johannes SchindelinJul 24, 2007
  28. Josef WeidendorferJul 24, 2007
  29. Jakub NarebskiJul 25, 2007
  30. Johannes SchindelinJul 24, 2007
  31. Marius Storm-OlsenJul 24, 2007
  32. Marius Storm-OlsenJul 24, 2007
  33. Johannes SchindelinJul 24, 2007
  34. Marius Storm-OlsenJul 24, 2007
  35. Johannes SchindelinJul 24, 2007
  36. Marius Storm-OlsenJul 24, 2007
  37. Alex RiesenJul 24, 2007
  38. Marius Storm-OlsenJul 25, 2007
  39. Johannes SchindelinJul 25, 2007
  40. Steven GrimmJul 25, 2007
  41. Andy ParkinsJul 25, 2007
  42. Marius Storm-OlsenJul 25, 2007
  43. Johannes SchindelinJul 25, 2007
  44. Linus TorvaldsJul 25, 2007
  45. Christian MICHONJul 26, 2007
  46. Julian PhillipsJul 23, 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.