Skip to content

Instantly share code, notes, and snippets.

@DimDev
Last active July 24, 2020 07:07
Show Gist options
  • Save DimDev/6102632 to your computer and use it in GitHub Desktop.
Save DimDev/6102632 to your computer and use it in GitHub Desktop.
git aliases
git config --global alias.co checkout
git config --global alias.ci commit
git config --global alias.st status
git config --global alias.br branch
git config --global alias.hist 'log --pretty=format:"%h %ad | %s%d [%an]" --graph --date=short'
git config --global alias.type 'cat-file -t'
git config --global alias.dump 'cat-file -p'
git config --global alias.fixlast "commit --all --amend --no-edit"
git config --global color.ui auto
git config --global core.editor vim
git config --global user.name "Dmitry K"
git config --global user.email example@example.com
git config core.fileMode false
Pretty log:
git log --oneline --graph --branches
git log --graph --date=short --branches --pretty=format:'%C(yellow)%h%C(reset) %ad | %C(75)%s%C(reset) %C(yellow)%d%C(reset) [%an]'
Useful:
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment