Last active
April 8, 2022 00:35
-
-
Save QinMing/997a502af8856d31b61d51fc747c551a to your computer and use it in GitHub Desktop.
My git configurations, mainly alias. Just need to run it once.
This file contains 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
#!/bin/bash | |
git config --global user.name "Ming Qin" | |
git config --global user.email "$email_address" | |
git config --global push.default current | |
git config --global alias.l "log --stat --graph --pretty=format:'%Cred%h%Creset -%C(yellow)%d%Creset %s %C(blue)(%an %ch)%Creset%n' --abbrev-commit" | |
git config --global alias.last "log -1 HEAD" | |
git config --global alias.a "add" | |
git config --global alias.b "branch -v --sort=committerdate" | |
git config --global alias.c "commit" | |
git config --global alias.cm "commit" | |
git config --global alias.wip "commit -am wip" | |
git config --global alias.amend "commit --amend -a --no-edit" | |
git config --global alias.ck "checkout" | |
git config --global alias.d "diff" | |
git config --global alias.f "fetch" | |
#git config --global alias.s "status -uno" | |
git config --global alias.s "status" | |
git config --global alias.p "pull" | |
git config --global alias.r "remote" | |
git config --global init.defaultBranch main | |
#by ggustafsson http://superuser.com/questions/366930/how-do-i-get-the-git-pager-to-clean-up-screen-output-after-exit | |
git config --global core.pager 'less -+$LESS -R' |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment