Last active
September 27, 2015 14:48
-
-
Save jzaefferer/1287185 to your computer and use it in GitHub Desktop.
git-bash addons
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
# excerpt, I've got my stuff in my file | |
source ~/.git-completion.bash | |
source ~/.git-flow-completion.bash | |
export PS1='\w $(vcprompt)\$ ' | |
alias s="git status" | |
alias d="git diff" | |
alias git=hub |
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
[user] | |
name = [...] | |
email = [...] | |
[github] | |
user = [...] | |
token = [...] | |
[remote "origin"] | |
push = HEAD | |
[color] | |
ui = auto | |
[color "branch"] | |
current = blue reverse | |
local = blue | |
remote = green | |
[color "diff"] | |
meta = blue bold | |
frag = magenta bold | |
old = red bold | |
new = green bold | |
whitespace = red reverse | |
[color "status"] | |
added = blue | |
changed = green | |
untracked = cyan | |
[core] | |
whitespace=fix,-indent-with-non-tab,trailing-space,cr-at-eol | |
excludesfile = ~/.gitignore | |
[rerere] | |
enabled = true | |
[alias] | |
st = status | |
ci = commit | |
cm = commit -am | |
br = branch | |
co = checkout | |
df = diff | |
lp = log -p | |
c = cherry-pick | |
b = checkout - | |
who = shortlog -n -s --no-merges | |
undo = reset --hard | |
lc = log ORIG_HEAD.. --stat --no-merges | |
lg = log --graph --pretty=format:'%Cred%h%Creset -%C(yellow)%d%Creset %s %Cgreen(%cr) %C(bold blue)<%an>%Creset' --abbrev-commit --date=relative | |
lw = log --graph --pretty=format:'%s %Cgreen(%cr) ' --abbrev-commit --date=relative --author Jörn | |
lf = log --pretty=fuller | |
cleanup = !git gc && git remote prune origin | |
fork = remote add -f | |
ghpages = !git pull && git co gh-pages && git merge master && git push && git co master | |
prom = pull --rebase | |
pd = !pretty-diff | |
gd = !gist-diff | |
cp = cherry-pick | |
amend = commit -a --amend | |
pr = "!f() { git fetch -fu origin refs/pull/$1/head:pr/$1 ; git co pr/$1; } ; f" | |
pr-clean = "!git for-each-ref refs/heads/pr/* --format='%(refname)' | while read ref ; do branch=${ref#refs/heads/} ; git branch -D $branch ; done" | |
branch=${ref#refs/heads/} ; git branch -D $branch ; done" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment