Last active
June 12, 2021 22:26
-
-
Save danielrobertson/aeb6a1cfaa06380449a6 to your computer and use it in GitHub Desktop.
.gitconfig
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
[user] | |
name = Daniel Robertson | |
email = danielrobertson733@gmail.com | |
[alias] | |
p = pull | |
a = add | |
st = status | |
ci = commit | |
br = branch | |
co = checkout | |
df = diff | |
lg = log --graph --pretty=format:'%Cred%h%Creset -%C(yellow)%d%Creset %s %Cgreen(%cr) %C(bold blue)<%an>%Creset' --abbrev-commit --date=relative | |
redev = !git fetch origin develop && git rebase origin/develop | |
remaster = !git fetch origin master && git rebase origin/master | |
remain = !git fetch origin main && git rebase origin/main | |
[url "git@github.com:"] | |
insteadOf = https://github.com/ | |
[push] | |
default = current |
Also useful, drop this in your ~/.bash_profile to get the branch name for git repo's in your PS1 prompt:
parse_git_branch() {
git branch 2> /dev/null | sed -e '/^[^*]/d' -e 's/* \(.*\)/ (\1)/'
}
export PS1="\w\[\033[32m\]\$(parse_git_branch)\[\033[00m\]$ "```
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Drop this into your ~/.gitconfig file