Skip to content

Useful Git Aliases

Michael Goerz edited this page Dec 30, 2019 · 1 revision

Put the following in your ~/.gitconfig:

[alias]
     st = status
     ci = commit
     br = branch
     co = checkout
     df = diff
     lg = log -p
     logv = log --name-status
     ls = ls-files
     fetch = fetch -v
     up = "!git remote update -p; git merge --ff-only @{u}"
     graph = "log --all --graph --decorate --pretty=format:'%Creset%h:%C(bold Blue)%d%Creset %an %cd (%cr)%n%s%n' --date=short"

Always use git up instead of git pull! Use git graph as much as possible to keep track of any merging/rebasing/stashing.