On Wed, 30 Mar 2011 10:14:05 -0700 (PDT)
matseitz_cisco <matse...@cisco.com> wrote:
> > > 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->Create", I see an option to "Checkout After
> > > Creation",
> > > but I want to be sure that is the right choice.
> > It is the right choice.
> > To cite the git-checkout manual:
> > "If -b is given, a new branch is created as if git-branch(1) were
> > called and then checked out."
> Thanks for confirming that "git checkout -b" would be the correct CLI
> Are you also saying that the git gui "Branch->Create" command with the
> "Checkout After Creation" option enabled is the equivalent of "git
> checkout -b"?
Instead of spending so many time to write these two messages, you could
simply try this out:
$ mkdir /tmp/foo && cd /tmp/foo && git init .
$ touch aaa && git add . && git commit -m "root commit"
$ git checkout -b test
$ git branch
$ git checkout master
$ git branch -d test
(At this point there's again just the single branch, "master", which is
Then fire git-gui, run the command you wanted to test out,
go back to the shell and run
$ git branch
You will see the output identical to what you've seen after
running `git checkout -b test`.
Hence, note that git-gui does not do any kind of special magic which
cannot be seen using lower-level Git tools -- it just runs these tools
each time you issue one command or another.
You received this message because you are subscribed to the Google Groups "Git
for human beings" group.
To post to this group, send email to email@example.com.
To unsubscribe from this group, send email to
For more options, visit this group at