-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy path.gitconfig
More file actions
47 lines (45 loc) · 2.12 KB
/
.gitconfig
File metadata and controls
47 lines (45 loc) · 2.12 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
[user]
name = Richard Tingstad
[includeIf "gitdir:~/amedia/"]
path = ~/amedia/.gitconfig
[core]
filemode = false
autocrlf = input
excludesfile = ~/gitignore
editor = vim
[github]
user = tingstad
[url "git@github.com:"]
insteadOf = https://github.com/
[alias]
upstream = !"git fetch -q && git --no-pager log --oneline --no-merges \"HEAD..${1-$(git rev-parse --abbrev-ref @{upstream})}\""
upstreamraw = !"git fetch -q && git log --raw --no-merges \"HEAD..${1-$(git rev-parse --abbrev-ref @{upstream})}\""
local = !"git fetch -q && git --no-pager log --oneline --no-merges \"${1-$(git rev-parse --abbrev-ref @{upstream})}..HEAD\""
co = checkout
st = status
amend = commit --amend --no-edit
up = !"if git diff | grep -q . ;then git stash && git pull && git stash pop ;else git pull ;fi && echo OK"
accept-mine-rebase = "!f() { git checkout --theirs -- \"${@:-.}\" && git add -u \"${@:-.}\"; }; f"
accept-others-rebase = "!f() { git checkout --ours -- \"${@:-.}\" && git add -u \"${@:-.}\"; }; f"
accept-mine-merge = "!f() { git checkout --ours -- \"${@:-.}\" && git add -u \"${@:-.}\"; }; f"
accept-others-merge = "!f() { git checkout --theirs -- \"${@:-.}\" && git add -u \"${@:-.}\"; }; f"
graph = "log --graph --oneline --decorate"
fixup = !"f(){ git commit --fixup=\"$1\" && GIT_EDITOR=true git rebase -i \"$1\"^; }; f"
message = show -s --format=%B
subject = show -s --format=%s
recent = !"git for-each-ref --sort=-committerdate refs/heads --format='%(HEAD)%(color:yellow)%(refname:short)|%(color:red)%(objectname:short)|%(color:bold green)%(committerdate:relative)|%(color:blue)%(subject)|%(color:magenta)%(authorname)%(color:reset)' --color=always --count=20 | column -ts'|'"
split = !"f(){ commit=$1; file=\"$2\"; \
GIT_SEQUENCE_EDITOR='sed -i.old 1s/^pick/e/' git rebase -i $commit~ \
&& git reset HEAD~ -- \"$file\" && git commit --amend --no-edit \
&& git add -- \"$file\" && git commit -m Split && git rebase --continue \
;}; f"
[pull]
rebase = true
[merge]
tool = vimdiff
conflictstyle = diff3
[rebase]
autoSquash = true
autoStash = true
[push]
default = current