-
-
Notifications
You must be signed in to change notification settings - Fork 25
/
Copy path.gitconfig
66 lines (66 loc) · 2.58 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
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
[user]
useConfigOnly = true
[include]
path = ~/.gituser
[core]
pager = less -+S
autocrlf = true # This is for Windows; on Linux use "autocrlf = input".
safecrlf = warn
[alias]
aa = commit --amend -a --no-edit
bfg = "!f() { path=$(git --exec-path); [ ! -f \"$path/bfg.jar\" ] && curl -o \"$path/bfg.jar\" -L \"https://search.maven.org/remote_content?g=com.madgag&a=bfg&v=LATEST\"; java -jar \"$path/bfg.jar\" \"$@\"; }; f"
br = branch
cat = "!f() { git show $2:\"$1\"; }; f"
catchup = "!f() { git merge --ff-only upstream/$(git rev-parse --abbrev-ref HEAD); }; f"
chmod = update-index --chmod=+x
ci = commit -v
co = checkout
commit-id = "!f() { commit=${1:-HEAD}; git log -1 --patch $commit | git patch-id | cut -d' ' -f1; }; f"
cp = cherry-pick
dt = difftool -M
fp = fetch --all --prune
has = branch -a --contains
id = rev-parse --short HEAD
in = !git fetch -q && git log --oneline ..@{u}
out = "!f() { git log --oneline @{u}.. 2> /dev/null || git log --oneline origin/$(git remote show origin | grep 'HEAD branch' | cut -d' ' -f5)..; }; f"
l1 = log -1 --pretty=fuller
lro = "!f() { right=${2:-HEAD}; git log --oneline --cherry-mark --right-only $1...$right; }; f"
log-day = !git log --oneline --no-merges --since=1.day --author=\"$(git config user.name)\"
log-sprint = !git log --oneline --no-merges --since=2.weeks --author=\"$(git config user.name)\"
ls = "!f() { git ls-tree -r --name-only ${2:-HEAD} | grep \"${1:-.*}\"; }; f"
mb = "!f() { git branch -r | grep ${USER-$USERNAME}; }; f"
mt = mergetool
mu = merge --ff-only @{u}
orphan = "!f() { git checkout --orphan $1 && git rm -fr .; }; f"
pr = pull --rebase
puf = push --force-with-lease
ra = rebase --abort
rc = rebase --continue
remign = "!f() { git ls-files -i -z --exclude-from=.gitignore | xargs -0 git rm --cached; }; f"
ri = rebase -i
rs = remote -v
ru = reset --hard @{u}
sq = "!f() { amount=${1:-2}; git reset --soft HEAD~$amount && git commit -m \"$(git log --format=%B --reverse HEAD..HEAD@{1})\" --edit; }; f"
squash-all = "!f() { git reset $(git commit-tree HEAD^{tree} -m \"${1:-Initial commit}\"); }; f"
st = status
unpushed = log --branches --not --remotes --simplify-by-decoration --decorate --oneline
up = "!f() { upstream=${1:-upstream/master}; head=${2:-HEAD}; git log --cherry --oneline $upstream...$head; }; f"
[color]
ui = true
[push]
default = current
[rebase]
autosquash = true
[rerere]
enabled = true
[diff]
renamelimit = 0
renames = copies
indentHeuristic = true
[merge]
tool = bc
[mergetool]
prompt = false
[mergetool "bc"]
path = c:/Program Files (x86)/Beyond Compare 4/BComp.com
trustExitCode = true