-
Notifications
You must be signed in to change notification settings - Fork 1
/
gitconfig
32 lines (32 loc) · 1.17 KB
/
gitconfig
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
# vim:ft=gitconfig:
[push]
default = current
[color]
ui = auto
diff = auto
status = auto
branch = auto
[alias]
create-branch = !sh -c 'git push origin HEAD:refs/heads/$1 && git fetch origin && git branch --track $1 origin/$1 && cd . && git checkout $1' -
delete-branch = !sh -c 'git push origin :refs/heads/$1 && git remote prune origin && git branch -D $1' -
delete-last-commit = reset --hard HEAD~1
diff-last-commit = diff HEAD^ HEAD
merge-branch = !git checkout master && git merge --ff-only @{-1}
pr = !hub pull-request
ls = config --list
ref = reflog
remove-sensitive-file = !sh -c 'git filter-branch --force --index-filter ''git rm --cached --ignore-unmatch $1'' --prune-empty --tag-name-filter cat -- --all' -
sub = submodule
sub-update = submodule foreach git pull
sub-update-origin = submodule foreach git pull origin master
tracking-remote = rev-parse --abbrev-ref --symbolic-full-name @{u}
undo-last-commit = reset --soft HEAD~1
up = !git fetch origin && git rebase origin/master
[core]
excludesfile = ~/.gitignore
autocrlf = input
pager = less -iFQX
[include]
path = ~/.gitconfig.local
[includeIf "gitdir:~/workplace/"]
path = ~/workplace/.gitconfig.local