Last active
February 18, 2022 06:55
-
-
Save saemu/23cc70b512e6afc097500293e9f02c51 to your computer and use it in GitHub Desktop.
Git Settings
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 | |
curl -q https://raw.githubusercontent.com/git/git/master/contrib/completion/git-prompt.sh -o ~/.git-prompt.sh | |
curl -q https://raw.githubusercontent.com/git/git/master/contrib/completion/git-completion.bash -o ~/.git-completion.bash | |
cat << EOF >> ~/.bashrc | |
if [ -f ~/.git-completion.bash ]; then | |
. ~/.git-completion.bash | |
fi | |
if [ -f ~/.git-prompt.sh ]; then | |
. ~/.git-prompt.sh | |
fi | |
export GIT_PS1_SHOWDIRTYSTATE=true | |
export GIT_PS1_SHOWUNTRACKEDFILES=true | |
export GIT_PS1_SHOWCOLORHINTS=true | |
export PS1='[\u@\h \W\$(declare -F __git_ps1 &>/dev/null && __git_ps1 " (%s)")]\$ ' | |
EOF |
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 alias.mylog "log --graph --pretty=format:'%Cred%h%Creset -%C(yellow)%d%Creset %s %Cgreen(%cr) %C(bold blue)<%an>%Creset' --abbrev-commit" | |
git config --global core.excludesfile ~/.gitignore | |
git config --global pull.rebase true | |
git config --global status.submodulesummary true | |
git config --global fetch.recursesubmodules true | |
git config --global fetch.prune true | |
git config --global tag.sort version:refname | |
git config --global color.status auto | |
git config --global color.branch auto | |
git config --global color.ui auto | |
git config --global diff.wserrorhighlight all | |
git config --global color.diff.whitespace "blue reverse" | |
git config --global rerere.enabled true |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment