-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathgitconfig
62 lines (54 loc) · 1.79 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
[color]
ui = true
[core]
editor = vim
excludesfile = ~/.gitignore
pager = less -F -X
[alias]
amend = commit --amend --reuse-message=HEAD --no-verify
sclone = clone --depth=1
br = branch
ci = commit
# Clean up merged branches except "master" and "develop".
cleanup = "!git branch --merged | grep -v -P '^([\\*|\\+].*| master| develop)$' | xargs -n1 -r git branch -d; echo done cleaning"
co = checkout
cp = cherry-pick
df = diff
hist = log --pretty="tformat:\"%Cgreen%h%Creset %ad | %s %Cgreen%d%Creset [%an]\"" --date=short
home = "!f() { cd $(git rev-parse --show-toplevel); }; f"
fix = "!git amend && git pushf"
last = log -1 HEAD
lg = log -p
pushf = push --force-with-lease
# Push and merge a GitLab merge request. This is useful, especially if you have CI pipelines with a lot of tests.
pusha = push -o merge_request.create -o merge_request.merge_when_pipeline_succeeds
recover = "!f() { git checkout $(git rev-list -n 1 HEAD -- \"$1\")^ -- \"$1\";}; f"
remotes = remote -v
st = status -sb .
tags = tag -l
unstage = reset HEAD --
up = !pull --rebase --autostash -X HEAD
update = pull --rebase --autostash -X theirs origin develop
who = shortlog -s --
wip = for-each-ref --sort='authordate:iso8601' --format=' %(color:green)%(authordate:relative)%09%(color:white)%(refname:short)' refs/heads
[push]
default = current
followTags = true
autoSetupRemote = true
[pull]
rebase = true
[rebase]
autostash = true
[fetch]
prune = true
[checkout]
defaultRemote = origin
[http]
sslVerify = true
# use separate file for username / github token / GPG key / etc
[include]
path = ~/.gitconfig.local
[rerere]
enabled = true
[maintenance]
repo = /home/kuhrt/work/code/devops/pm