-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.gitconfig
82 lines (68 loc) · 1.99 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
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
[user]
name = squ94wk
email = [email protected]
[core]
autocrlf = input
editor = vim
excludefiles = ~/.gitignore
[alias]
dot = "!git --git-dir=${HOME}/.dotfiles --work-tree=${HOME}"
f = fetch --all --prune --tags
ff = merge --ff-only
fff = "!git f && git ff"
ffff = "!git f -f && git ff"
fm = "!git fetch origin $(git config init.defaultBranch):$(git config init.defaultBranch)"
# Log in increasing detail
l = log --pretty=format:"%C(yellow)%h\\ %ad%Cred%d\\ %Creset%s%Cblue\\ [%cn]" --decorate --date=short
ll = log --pretty=format:"%C(yellow)%h%Cred%d\\ %Creset%s%Cblue\\ [%cn]" --decorate --numstat
lll = log -u
lg = log --graph --oneline
s = status -s --untracked-files=no
a = add
ap = add --patch
# Committing
c = commit
# Commit with message
cm = commit -m
# Ammend last commit
ca = commit --amend --no-edit
# Undo one commit
undo-commit = reset --soft HEAD~
# Rebase
rb = rebase --autostash
rbm = "!git rebase --autostash $(git config init.defaultBranch)"
ri = rebase --interactive --autostash
# Rebase interactively from $1 number of commits back
ra = rebase --abort
rc = rebase --continue
rs = rebase --skip
# Search
grep = grep -Ii
# Current branch
this = rev-parse --abbrev-ref HEAD
sha = rev-parse HEAD
# Search for files
ls = "!git ls-files | grep ''"
# Track remote branch
track = "!git branch --set-upstream-to=origin/$(git this)"
# Clean up branches
gcb = "!git branch --merged | grep -v -E \"master|main|$(git this)\" | while read -r branch; do git branch -d $branch; done"
# How many commits per author
rank = shortlog -n -s --no-merges
# Abbreviations
br = branch
cp = cherry-pick
co = checkout
sw = switch
mt = mergetool
[include]
path = .gitconfig.local
[rebase]
updateRefs = true
[fetch]
default = current
prune = true
[pull]
default = current
[push]
default = current