-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathgitconfig
More file actions
87 lines (87 loc) · 2.65 KB
/
gitconfig
File metadata and controls
87 lines (87 loc) · 2.65 KB
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
[init]
defaultBranch = main
templatedir = ~/.git_template
[core]
excludesfile = ~/.gitignore
editor = nvim
ignorecase = false
autocrlf = input
[push]
default = simple
[color]
status = auto
diff = auto
branch = auto
interactive = auto
grep = auto
ui = auto
[merge]
ff = only
[commit]
template = ~/.gitmessage
[fetch]
prune = true
[rebase]
autosquash = true
[alias]
a = "!git status --short | peco | awk '{print $2}' | xargs git add"
d = diff
co = checkout
ci = commit
ca = commit -a
ps = "!git push origin $(git rev-parse --abbrev-ref HEAD)"
pl = "!git pull origin $(git rev-parse --abbrev-ref HEAD)"
st = status
br = branch
ba = branch -a
bm = branch --merged
bn = branch --no-merged
df = "!git hist | peco | awk '{print $2}' | xargs -I {} git diff {}^ {}"
hist = log --pretty=format:\"%Cgreen%h %Creset%cd %Cblue[%cn] %Creset%s%C(yellow)%d%C(reset)\" --graph --date=relative --decorate --all
llog = log --graph --name-status --pretty=format:\"%C(red)%h %C(reset)(%cd) %C(green)%an %Creset%s %C(yellow)%d%Creset\" --date=relative
open = "!hub browse"
type = cat-file -t
dump = cat-file -p
find = "!f() { git log --pretty=format:\"%h %cd [%cn] %s%d\" --date=relative -S'pretty' -S\"$@\" | peco | awk '{print $1}' | xargs -I {} git diff {}^ {}; }; f"
# edit conflicted file on merge
edit-unmerged = "!f() { git ls-files --unmerged | cut -f2 | sort -u ; }; vim `f`"
# add conflicted file on merge
add-unmerged = "!f() { git ls-files --unmerged | cut -f2 | sort -u ; }; git add `f`"
#[alias]
# aa = add --all
# ap = add --patch
# branches = for-each-ref --sort=-committerdate --format=\"%(color:blue)%(authordate:relative)\t%(color:red)%(authorname)\t%(color:white)%(color:bold)%(refname:short)\" refs/remotes
# ci = commit -v
# co = checkout
# pf = push --force-with-lease
# st = status
# sl = log --oneline --decorate -20
# sla = log --oneline --decorate --graph --all -20
# slp = log --oneline --decorate
# slap = log --oneline --decorate --graph --all
# pl = pull
# ps = push
# fad = !git add $(git ls-files --others --exclude-standard -m | fzf --reverse --multi)
# bselect = !git branch | grep -v '^*' | fzf-tmux --reverse | xargs git checkout
[hub]
protocol = https
[github]
user = am1re
[user]
name = Amir Abu Shamala
email = am1re344@gmail.com
[diff]
tool = nvimdiff
[difftool "nvimdiff"]
cmd = nvim -d \"$LOCAL\" \"$REMOTE\"
path =
[mergetool "nvimdiff"]
cmd = nvim -d \"$LOCAL\" \"$REMOTE\" -ancestor \"$BASE\" -merge \"$MERGED\"
trustExitCode = true
[filter "lfs"]
clean = git-lfs clean -- %f
smudge = git-lfs smudge -- %f
required = true
process = git-lfs filter-process
[ghq]
root = ~/.ghq