Last active
May 6, 2020 14:26
-
-
Save phantompunk/78b9f9f6608cbc542cfcfccc512e7152 to your computer and use it in GitHub Desktop.
Share Global Git Config Between PCs
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
# Add to $HOME root directory | |
# curl -o .gitconfig https://gist.githubusercontent.com/phantompunk/78b9f9f6608cbc542cfcfccc512e7152/raw/.gitconfig | |
# Run once after downloading the config | |
# git config --global core.excludesfile ~/.gitignore_global | |
[alias] | |
co = checkout | |
cob = checkout -b | |
cm = commit -m | |
st = status | |
br = branch | |
lg = "log --color --graph --pretty=format:'%Cred%h%Creset -%C(yellow)%d%Creset %s %Cgreen(%cr) %C(bold blue)<%an>%Creset' --abbrev-commit" | |
us = reset HEAD # Followed by <file> unstages the file from the commit | |
undo = reset --soft HEAD^ # Undo the last commit | |
pub = !git push --set-upstream origin $(git rev-parse --abbrev-ref HEAD) # Push new branch | |
[user] | |
name = Rodrigo Moran | |
email = rigo.moran0@gmail.com | |
[core] | |
excludesfile = $HOME/.gitignore_global |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment