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

Re: [PATCH 1/2] Allow users to require source branch on git-checkout -b.

From
Shawn Pearce <spearce@spearce.org>
Date
Dec 8, 2006, 05:59 UTC
Message-ID
<20061208055938.GB13999@spearce.org>
In-Reply-To
<20061208044516.GC5939@fieldses.org>
"J. Bruce Fields" <bfields@fieldses.org> wrote:
Show 8 quoted lines
> On Thu, Dec 07, 2006 at 04:59:14PM -0500, Shawn Pearce wrote:
> > I'm seeing bad branches all to often with some of the folks I have
> > to work with.  They apparently have been unable to learn the new
> > trick of either remembering what branch they are currently on and
> > what changes it has, or to always supply the branch they want to
> > start from with their new branch.
> 
> Would the trick of putting the branch name in the shell prompt work?
Its in the prompt for all of these users; I forced it in as part of
the system's /etc/profile.d.  They just forget that they should think
about where they should start their branch from before they make it.
 
Show 5 quoted lines
> But my main complaint is just that I wouldn't want to see the behavior
> of defaulting to HEAD--behavior which is simple, easy to explain, and
> shared by most other git commands--by something significantly more
> complicated.  That's more a complaint about Junio's suggestion than
> yours, though.

True, defaulting to HEAD is something that is done almost everywhere. Changing it for `git checkout -b` may surprise a lot of people, almost as much as --index vs. --cached.

Maybe what I should do is stop whining about the command line Porcelain-ish and get branch controls working in git-gui. Then I can take away the command line from these users who are causing me so much grief.

Previous: J. Bruce FieldsNext: J. Bruce Fields
Message 8 of 12 in “Allow users to require source branch on git-checkout -b.”
  1. 1/2 Allow users to require source branch on git-checkout -b.Shawn O. Pearce, Dec 7, 2006
  2. Junio C HamanoDec 7, 2006
  3. Shawn PearceDec 7, 2006
  4. Junio C HamanoDec 7, 2006
  5. J. Bruce FieldsDec 7, 2006
  6. Shawn PearceDec 7, 2006
  7. J. Bruce FieldsDec 8, 2006
  8. Shawn PearceDec 8, 2006
  9. J. Bruce FieldsDec 8, 2006
  10. Shawn PearceDec 8, 2006
  11. Junio C HamanoDec 8, 2006
  12. J. Bruce FieldsDec 8, 2006

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.