Skip to content

Instantly share code, notes, and snippets.

@aaronolds
Last active August 6, 2018 01:18
Show Gist options
  • Save aaronolds/5ee5ecb7e1dd69ef526335f1f1b3305c to your computer and use it in GitHub Desktop.
Save aaronolds/5ee5ecb7e1dd69ef526335f1f1b3305c to your computer and use it in GitHub Desktop.
Git Aliases for Windows (Linux and Mac use single quotes instead of double quotes)
Alias:
git config --global alias.add-commit "!git add -A && git commit"
Usage:
git add-commit -m "My commit message"
Alias:
git config --global alias.lg "log --oneline --decorate --all --graph"
Usage:
git lg
Added directly to the .gitconfig
ls = log --pretty=format:"%C(yellow)%h%Cred%d\\ %Creset%s%Cblue\\ [%cn]" --decorate
ll = log --pretty=format:"%C(yellow)%h%Cred%d\\ %Creset%s%Cblue\\ [%cn]" --decorate --numstat
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment