-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.gitconfig
106 lines (84 loc) · 2.08 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
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
[user]
name = Lucas Rinaldi
email = [email protected]
[core]
attributesfile = ~/.gitattributes
autocrlf = input
editor = code
excludesfile = ~/.gitignore_global
whitespace = fix,-indent-with-non-tab,trailing-space,cr-at-eol
[pull]
rebase = true
[push]
default = simple
recurseSubmodules = check
[status]
submodulesummary = 1
[init]
defaultBranch = main
[alias]
# Aliases
aliases = !git config -l | grep alias | cut -c 7-
# Add
a = add --all
ap = add . -p
# Branch
b = branch
bm = branch --merged
bmr = branch --merged --remote
branch-name = !"git rev-parse --abbrev-ref HEAD"
bn = branch-name
# Commit
c = commit
ca = commit --amend
cm = commit --message
cme = commit --allow-empty --message
cdv = commit --dry-run --verbose
unc = reset HEAD~
uns = reset HEAD --
# Config
cfg = config --global --edit
# Cleanup
cleanup-force-local = !"git branch | grep -v main | grep -v master | xargs git branch -D"
cleanup-local-remote = !"git remote prune origin"
# Checkout
co = checkout
cob = checkout -b
# Diff
df = diff
dc = diff --cached # Show changes that have been staged
# Fetch
ft = fetch
# List
ls = ls-files
ls-ign = ls-files -o -i --exclude-standard # Show files ignored by git
# Log
l = log
l1 = l --oneline
last = l -1 HEAD
last1 = lo -1 HEAD
lg = "log --graph --pretty=format:'%Cred%h%Creset -%C(yellow)%d%Creset %s %Cgreen(%cr) %C(bold blue)<%an>%Creset' --abbrev-commit --date=relative"
# Merge
m = merge
ma = merge --abort
mc = merge --continue
ms = merge --skip
# Pull
pl = pull --ff-only
# Push
ps = push
psf = push --force
pst = ps --tags
psu = !"git push -u origin $(git bn)" # Push the current branch to the remote "origin", and set it to track the upstream branch
psut = !"git psu --tags"
psdel = !"git push origin :$(git bn)" # Delete the remote version of the current branch
# Prune
pr = prune -v
# Rebase
rb = rebase
rba = rebase --abort
rbc = rebase --continue
rbi = rebase --interactive
rbs = rebase --skip
# Status
st = status