GitUI Cheatsheet
Navigation #
| Key |
Action |
hjkl |
Left, Down, Up, Right |
Enter |
Select/Confirm |
Tab |
Switch between panels |
Esc |
Go back/Cancel |
q |
Quit |
File Staging Panel #
| Key |
Action |
Space |
Stage/unstage file |
a |
Stage all |
A |
Stage all tracked |
c |
Commit |
e |
Edit file in $EDITOR |
d |
Discard changes |
i |
Toggle ignored files |
r |
Refresh |
Staging View (Hunks) #
| Key |
Action |
Space |
Stage/unstage hunk |
a |
Stage all hunks |
A |
Stage all tracked |
c |
Commit |
s |
Stage selection |
u |
Unstage selection |
d |
Discard hunk |
e |
Edit hunk |
Enter |
Toggle hunk selection |
Log Panel #
| Key |
Action |
Enter |
Show commit details |
c |
Cherry-pick commit |
r |
Revert commit |
b |
Create branch from commit |
t |
Tag commit |
s |
Squash commits |
f |
Fixup commits |
Branch Panel #
| Key |
Action |
c |
Checkout branch |
n |
New branch |
d |
Delete branch |
D |
Force delete branch |
r |
Rename branch |
m |
Merge branch |
R |
Rebase onto branch |
Stashing #
| Key |
Action |
z |
Stash changes |
Z |
Stash with message |
p |
Pop stash |
a |
Apply stash |
d |
Drop stash |
Status Panel #
| Key |
Action |
l |
Open log |
b |
Open branches |
s |
Open stash |
t |
Open tags |
r |
Open remotes |
f |
Fetch |
P |
Push |
p |
Pull |
m |
Merge |
R |
Rebase |
Search #
| Key |
Action |
/ |
Search |
n |
Next result |
N |
Previous result |
Help #
| Key |
Action |
? |
Show help |
1 |
Show status help |
2 |
Show log help |
3 |
Show diffing help |
Common Workflows #
Commit Changes #
- Open GitUI:
gitui
- Stage files:
Space on each file
- Commit:
c → type message → Enter
Switch Branch #
- Open branches:
b
- Select branch:
j/k → Enter
- Checkout:
c
Cherry-pick #
- Open log:
l
- Select commit:
Enter
- Cherry-pick:
c
Resolve Conflicts #
- During merge/rebase, conflicts appear
- Press
e to edit conflicted file
- Resolve in editor
- Return to GitUI
- Continue:
c
Keyboard Tips #
Quick quit: q from anywhere
Back out: Esc cancels current operation
Bulk stage: In staging, a stages all
Search files: / to search, n for next
Edit file: e opens in $EDITOR
Quick Reference #
Status → Commit: gitui → Space files → c
Checkout: gitui → b → select → c
Log view: gitui → l
Stash: gitui → z
Push: gitui → P