Short reminder of the oh-my-zsh git plugin. Enable it, then the aliases below are enough for everyday commits and rebases. Full git still works; these are only shortcuts.
# ~/.zshrc
plugins=(git)
# or if you already have a list:
plugins=(git zsh-autosuggestions)
Reload with source ~/.zshrc or open a new terminal. Check with alias gst.
| Alias | Runs |
|---|---|
gst | git status |
gd | git diff |
gds | git diff --staged |
gl | git pull |
glog | git log --oneline --decorate --graph |
| Alias | Runs |
|---|---|
ga | git add |
gaa | git add --all |
gcmsg | git commit --message |
gc! | git commit --verbose --amend |
gp | git push |
gpf | git push --force-with-lease |
| Alias | Runs |
|---|---|
gb | git branch |
gco | git checkout |
gcb | git checkout -b |
gsw | git switch |
gswc | git switch --create |
gm | git merge |
grb | git rebase |
gswc feat/short-name
# edit files
gaa && gcmsg "explain why, not what"
gp
Prefer gpf over a raw force-push. Skip gc! on commits that already left your machine.