-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.gitconfig
63 lines (63 loc) · 1.91 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
[user]
email = 0xleo.git@gmail.com
name = leonmavr
[push]
default = current
[core]
editor = vim
[alias]
a = add -A
al = add --all
ba = branch -a
cl = clone
cm = commit -m
cma = commit --amend
cmdiff = !git diff $1~ $1 # $1 is the commit hash
co = checkout
cob = checkout -b
d = diff
# date of current commit if not args or if arg if passed
date = !git show -s --date=format:'%Y/%m/%d-%H:%M' --format=%cd $1
dc = diff --cached
deleted = ls-files --deleted
f = fetch
fu = !git fetch `git upstream-remote`
# f this - undo all changes roll back to last commit's state`
fthis = reset --hard HEAD
l = log --pretty=custom
lg = log --graph --pretty=custom
modified = ls-files --modified
pl = pull
# stash all changes and pull (force pull)
plf = !git add -A . && git stash && git pull
# if there's no tracking info; set tracking info and pull
pltr = !branch=`git rev-parse --abbrev-ref HEAD` && git pull origin $branch
ps = push
# force pull
psf = !repo=`git config --get remote.origin.url` && branch=`git rev-parse --abbrev-ref HEAD` && git push -f $repo $branch
# push from detached head directly into branch
pshead = git push origin HEAD:$1 -f
# remove branch locally and remotely
rmbranch = !git push -d origin $1 && git branch -D $1
sh = stash
st = status
staged = ls-files --staged
subinup = submodule update --init --recursive
unstage = !git restore --staged $1
untracked = ls-files --other --exclude-standard
[pretty]
custom = "%C(magenta)%h%C(red)%d %C(yellow)%ar %C(green)%s %C(yellow)(%an)"
[branch "*"]
rebase = true
[pull]
rebase = true
[diff]
tool = vimdiff
[merge]
tool = vimdiff
conflictstyle = diff3
[filter "lfs"]
smudge = git-lfs smudge -- %f
process = git-lfs filter-process
required = true
clean = git-lfs clean -- %f