Git abbreviations
Fish shell abbreviations for every git workflow. Type the abbreviation and a space, and fish expands it to the command beside it.
Everyday
Base1
- git
Status2
- git status -sb
- git status
Branch6
- git branch
- git branch -d
- git branch -a
- git branch --merged
- git branch --no-merged
- git for-each-ref --sort=committerdate refs/heads/ --format='%(HEAD) %(color:yellow)%(refname:short)%(color:reset) - %(color:red)%(objectname:short)%(color:reset) - %(contents:subject) - %(authorname) (%(color:green)%(committerdate:relative)%(color:reset))'
Checkout2
- git checkout
- git checkout -b
Commit4
- git commit -m
- git commit -am
- git commit --amend --no-edit
- git commit --amend
Log7
- git log --color --graph --pretty=format:'%Cred%h%Creset -%C(yellow)%d%Creset %s %Cgreen(%cr) %C(bold blue)<%an>%Creset' --abbrev-commit
- git log --pretty=format:'%C(yellow)%h%Cred%d %Creset%s%Cblue [%cn]' --decorate --numstat
- git log --pretty=format:'%C(yellow)%h%Cred%d %Creset%s%Cblue [%cn]' --decorate
- git log --pretty=format:'%C(yellow)%h %ad%Cred%d %Creset%s%Cblue [%cn]' --decorate --date=relative
- git log --pretty=format:'%h %ad | %s%d [%an]' --graph --date=short
- git log --since=midnight --author='(git config user.name)' --oneline
- git log --since='2 days ago' --until=midnight --author='(git config user.name)' --oneline
Staging4
- git add --all
- git add -p
- git add -u
- git reset HEAD --
Stash7
- git stash list
- git stash save
- git stash pop
- git stash apply
- git stash drop
- git stash clear
- git stash show -p
Remote9
- git fetch
- git fetch --all
- git fetch origin
- git push
- git push -u origin HEAD
- git push --force-with-lease
- git pull
- git pull --rebase
- git remote -v
Diff7
- git diff --cached
- git diff HEAD
- git diff HEAD~1
- git diff --word-diff
- git difftool
- git diff --name-status
- git diff --stat
Undo2
- git reset --soft HEAD~1
- git reset HEAD~1 --mixed
Rebase4
- git rebase -i
- git rebase --continue
- git rebase --abort
- git rebase --skip
Merge2
- git merge
- git merge --no-ff
Tags2
- git tag -l
- git describe --tags --abbrev=0
Search2
- git ls-files | grep -i
- git grep -Ii
Info2
- git shortlog -sne
- git config --get-regexp alias