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

Re: git gui equivalent to git checkout -b

From
Pat Thoyts <patthoyts@users.sourceforge.net>
Date
Mar 30, 2011, 12:56 UTC
Message-ID
<87y63wpy0o.fsf@fox.patthoyts.tk>
In-Reply-To
<imrapc$f7u$1@dough.gmane.org>
"Matt Seitz" <matseitz@cisco.com> writes:
Show 9 quoted lines
>What is the git gui equivalent to "git checkout -b"?
>
>I have a working tree with changes that I don't want to commit to "master" 
>yet.  So I want to create a new branch to contain my changes.
>
>If I go to "Branch->Checkout", I don't see an option to create a new branch.
>
>If I go to "Branch->Create", I see an option to "Checkout After Creation", 
>but I want to be sure that is the right choice.
Create.
% echo junk >> git-gui.sh
% git status --short --branch
## master
 M git-gui.sh
% git gui # selected Branch, Create, Name=pt/demo, Checkout after Creation
% git status --short --branch
## pt/demo
 M git-gui.sh

If we don't select 'Checkout after Creation' then we don't move to the new branch. It is created but we remain on master.

-- 
Pat Thoyts                            http://www.patthoyts.tk/
PGP fingerprint 2C 6E 98 07 2C 59 C8 97  10 CE 11 E6 04 E0 B9 DD
Previous: Matt SeitzNext: Matt Seitz (matseitz)
Message 2 of 3 in “git gui equivalent to git checkout -b”
  1. Matt SeitzMar 29, 2011
  2. Pat ThoytsMar 30, 2011
  3. Matt Seitz (matseitz)Mar 31, 2011

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.