Skip to contentSkip to conversation

git gui equivalent to git checkout -b

DISCUSSION Matt Seitz 2 participants 3 messages Jun 15, 2016

lore
Share & tools
lore

Matt Seitz

author
#0 lore raw

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.

#1 lore raw
Quoted 9 lines · Matt Seitz

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.

Signature · 2 lines
Pat Thoyts                            http://www.patthoyts.tk/
PGP fingerprint 2C 6E 98 07 2C 59 C8 97  10 CE 11 E6 04 E0 B9 DD
#2 lore raw
Quoted 7 lines

From: Pat Thoyts [mailto:[email protected]]

Quoted 3 lines · Matt Seitz

What is the git gui equivalent to "git checkout -b"?

If I go to "Branch->Create", I see an option to "Checkout After

Creation",

Quoted 3 lines
Quoted 1 line

but I want to be sure that is the right choice.

Create.

Thanks for your help!