Skip to content

Instantly share code, notes, and snippets.

@tmarwen
Last active August 29, 2015 14:06
Show Gist options
  • Save tmarwen/c70c6dfe992cefa8c0fb to your computer and use it in GitHub Desktop.
Save tmarwen/c70c6dfe992cefa8c0fb to your computer and use it in GitHub Desktop.
Git awesome, useful aliases...

Some useful aliases include:

Alias Command What to Type
git cm git commit git config --global alias.cm commit
git co git checkout git config --global alias.co checkout
git ac git add . -A git commit git config --global alias.ac 'add -A && git commit'
git st git status -sb git config --global alias.st 'status -sb'
git tags git tag -l git config --global alias.tags 'tag -l'
git branches git branch -a git config --global alias.branches 'branch -a'
git remotes git remote -v git config --global alias.remotes 'remote -v'
git lg git log --color --graph --pretty=format:'%Cred%h%Creset -%C(yellow)%d%Creset %s %Cgreen(%cr) %C(bold blue)<%an>%Creset' --abbrev-commit -- git config --global alias.lg "log --color --graph --pretty=format:'%Cred%h%Creset -%C(yellow)%d%Creset %s %Cgreen(%cr) %C(bold blue)<%an>%Creset' --abbrev-commit --"

Some Aliases are taken from @tiimgreen dotfiles: https://github.com/tiimgreen/github-cheat-sheet/blob/master/README.md

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment