For best results, use hub and git bash completion (included with git under contrib/completion
).
-
-
Save rwaldron/987759 to your computer and use it in GitHub Desktop.
my git configuration
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
#! /bin/sh | |
alias git=hub | |
alias g=git | |
# aliases | |
git config --global alias.s "status -sb" | |
git config --global alias.d diff | |
git config --global alias.wd "diff --word-diff" | |
git config --global alias.a add | |
git config --global alias.cm commit | |
git config --global alias.ca "commit -a" | |
git config --global alias.co checkout | |
git config --global alias.rb rebase | |
git config --global alias.br branch | |
git config --global alias.ph push | |
git config --global alias.pl pull | |
git config --global alias.l "log --oneline --decorate" | |
git config --global alias.f fetch | |
git config --global alias.am "commit -a --amend" | |
git config --global alias.delete-remote '!sh -c "git push \$0 \:\$1"' | |
git config --global alias.r remote | |
git config --global alias.rv "remote -v" | |
git config --global alias.aliases "!git config --get-regexp 'alias.*' | colrm 1 6 | sed 's/[ ]/ = /'" | |
# colors | |
git config --global color.ui auto | |
# deal with windows file | |
git config --global core.autocrlf input | |
function gpm { | |
for REMOTE in "$@" | |
do | |
g ph $REMOTE master | |
done | |
} | |
# ignore changes to a file in the working tree | |
function gi { | |
git update-index --assume-unchanged $* | |
} | |
# update and init | |
function gsbm { | |
git submodule update --init | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment