-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathgitconfig
More file actions
55 lines (43 loc) · 1.6 KB
/
gitconfig
File metadata and controls
55 lines (43 loc) · 1.6 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
[user]
name = Povilas Balzaravičius
[alias]
st = status --ignore-submodules -s
ci = commit
cia = commit --amend --no-edit
co = checkout
br = branch
dc = diff --cached
adi = add --interactive
# Logging
lg = log --graph --pretty=format:'%Cred%h%Creset -%C(yellow)%d%Creset %s %Cgreen(%cr) %C(bold blue)[%an]%Creset' --abbrev-commit
ls = log --pretty=format:"%C(yellow)%h\\ %Cgreen%cd%Cred%d\\ %Creset%s%Cblue\\ [%cn]" --decorate --date=short
ll = log --pretty=format:"%C(yellow)%h%Cred%d\\ %Creset%s%Cblue\\ [%cn]" --decorate --numstat
lst = log --oneline -10
# List aliases
la = "!git config -l | grep alias | cut -c 7-"
# Assume
assume = update-index --assume-unchanged
unassume = update-index --no-assume-unchanged
assumed = "!git ls-files -v | grep ^h | cut -c 3-"
unassumeall = "!git assumed | xargs git update-index --no-assume-unchanged"
assumeall = "!git st -s | awk {'print $2'} | xargs git assume"
lasttag = describe --tags --abbrev=0
# Remove all local branches except current, main and master and wip.
brclean = "!git branch -l | sed 's/^[* ]*//g' | grep -Ev '^(main|master|wip)' | xargs -r git branch -D 2>/dev/null"
# Push current branch to origin.
bp = push -u origin HEAD
[color]
ui = true
[core]
editor = nvim
excludesfile = ~/.gitignore_global
untrackedCache = true
hooksPath = /Users/pb/.config/git/hooks
[include]
path = ~/.gitconfig.custom
[includeIf "gitdir:~/work/"]
path = ~/.gitconfig.work
[init]
defaultBranch = master
[url "git@github.com:"]
insteadOf = https://github.com/