-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.gitconfig
27 lines (22 loc) · 1.2 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
# This is Git's per-user configuration file.
[user]
email = [email protected]
name = Kai
[alias]
cm = !git add -A && git commit -m
co = checkout
#When starting new work, pull in and clean.
pullprep = pull --rebase --prune
#Checkout a new branch with name provided
cob = checkout -b
# Saves a savepoint for work in progress (credit to https://haacked.com/archive/2014/07/28/github-flow-aliases/)
save = !git add -A && git commit -m 'SAVEPOINT'
# An undo command to pair with save above - resets the commit but keeps the work for amending.
undo = reset HEAD~1 --mixed
# Nah - for when it's shit and you know it and just want rid.
nah = reset --hard && git clean -df
# Pretty log graph aliases as per https://stackoverflow.com/a/9074343/11825722
lg1 = log --graph --abbrev-commit --decorate --format=format:'%C(bold blue)%h%C(reset) - %C(bold green)(%ar)%C(reset) %C(white)%s%C(reset) %C(dim white)- %an%C(reset)%C(bold yellow)%d%C(reset)' --all
lg2 = log --graph --abbrev-commit --decorate --format=format:'%C(bold blue)%h%C(reset) - %C(bold cyan)%aD%C(reset) %C(bold green)(%ar)%C(reset)%C(bold yellow)%d%C(reset)%n'' %C(white)%s%C(reset) %C(dim white)- %an%C(reset)' --all
[pull]
rebase = false