Last active
September 18, 2017 23:10
-
-
Save nitriques/17117c251c30b72a8aff to your computer and use it in GitHub Desktop.
git config
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
git config --global user.email [email protected] | |
git config --global help.autocorrect 1 | |
git config --global color.ui 1 | |
git config --global core.excludesfile ~/.gitignore_global | |
git config --global apply.whitespace "fix" | |
git config --global core.abbrev 10 # default is 7, linux uses 12, nodejs uses 10 | |
git config --global rerere.enabled true | |
git config --global --add alias.lol "log --graph --decorate --pretty=oneline --abbrev-commit" | |
git config --global --add alias.tags "tag -l" | |
git config --global --add alias.branches "branch -a" | |
git config --global --add alias.remotes "remote -v" | |
git config --global --add alias.rem "rm --cached" | |
git config --global --add alias.cp "cherry-pick" | |
git config --global --add alias.updatesub "submodule foreach git pull origin master" | |
git config --global --add alias.unpushed "log --branches --not --remotes --simplify-by-decoration --decorate --oneline" | |
git config --global --add alias.pulls "pull --ff-only" | |
git config --global --add alias.pullr "pull --rebase" | |
git config --global --add alias.ff "merge --ff-only" | |
git config --global --add alias.undo "reset --soft HEAD^" | |
git config --global --add alias.patch "format-patch master -1 --stdout" | |
# from https://hackernoon.com/lesser-known-git-commands-151a1918a60 | |
git config --global --add alias.please 'push --force-with-lease' | |
git config --global --add alias.commend 'commit --amend --no-edit' | |
# from https://hackernoon.com/5-git-fundamentals-ded819a34cfe#.rw2wfqudk | |
git config --global --add alias.search "log --no-merges -i -E --pretty='%h (%ad) - [%an] %s %d' --date=format:'%b %d %Y' --grep" | |
# from https://blog.scottnonnenberg.com/better-git-configuration/ | |
git config --global --add alias.prune "fetch --prune" | |
git config --global --add alias.stash-all "stash save --include-untracked" | |
git config --global merge.conflictstyle diff3 | |
git config --global push.followTags 1 | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment