Skip to content

Instantly share code, notes, and snippets.

@mariselli
Last active February 10, 2016 15:06
Show Gist options
  • Save mariselli/508f94a671bc194e87d8 to your computer and use it in GitHub Desktop.
Save mariselli/508f94a671bc194e87d8 to your computer and use it in GitHub Desktop.
My git configuration

Remeber, to show all configurations type git config --list

My Git Alias

Show what file is changed in commit

git config --global alias.dc 'diff-tree --no-commit-id --name-only -r'

How to use: git dc 9b16a12

Git status minifyed

git config --global alias.s 'status -s'

How to use: git s

Git log less verbouse, clear and pretty

git config --global alias.lg 'log --oneline --decorate --all --graph'

How to use: git lg

Git commit with comment

git config --global alias.m 'commit -m'

Git add and commit with comment

git config --global alias.am 'commit -am'

General helpful configurations

git config --global push.default 'simple'

In this way when you type git push only the current branch will be pushed

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