Use emacsclient instead of emacs as git editor.
[dotfiles] / .gitconfig
1 [user]
2 name = patrick nsukami
3 email = ndkpatt@gmail.com
4
5 [core]
6 excludesfile = /home/nsukami/.gitignore
7 editor = emacsclient
8 autocrlf = input
9
10 [alias]
11 aliases = !git config --get-regexp 'alias.*' | colrm 1 6 | sed 's/[ ]/ = /'
12
13 pulled-changes = !git log -p -2
14 not-yet-pulled = !git log --name-status origin/master
15 lastco = log -1 HEAD --numstat
16
17 lol = log --graph --decorate --pretty=oneline --abbrev-commit
18 lola = log --graph --decorate --pretty=oneline --abbrev-commit --all
19 lg1 = log --graph --all --format=format:'%C(bold blue)%h%C(reset) - %C(bold green)(%ar)%C(reset) %C(white)%s%C(reset) %C(bold white)— %an%C(reset)%C(bold yellow)%d%C(reset)' --abbrev-commit --date=relative
20 lg2 = log --graph --all --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(bold white)— %an%C(reset)' --abbrev-commit
21 lg = !"git lg1"
22
23 undo-commit = reset --soft HEAD^
24 undo-add = reset HEAD
25 undo-modif = checkout
26
27 assume-unch = update-index --assume-unchanged
28 unassume-unch = update-index --no-assume-unchanged
29 list-assumed-unch = !git ls-files -v | grep "^[[:lower:]]"
30 unassumeall = "!git assumed | xargs git update-index --no-assume-unchanged"
31 assumeall = "!git st -s | awk {'print $2'} | xargs git assume-unch"
32
33 create-branch-from-stash = !git stash branch
34 create-branch = checkout -b
35 rename-branch = branch -m
36 goto-branch = checkout
37 delete-local-branch = branch -d
38
39 fix-latest-commit = commit --amend
40 panic = !tar cvf ../git_panic.tar *
41 current-branch = rev-parse --symbolic-full-name --abbrev-ref HEAD
42 number-of-commits-since-master = "! sh -c 'git log master..`git current-branch` --oneline | wc -l | tr -d \" \"'"
43
44 cl = clone
45 br = branch
46 ch = checkout
47 co = commit
48 st = status
49 br = branch
50 dc = diff --cached
51
52 hist = log --pretty=format:\"%h %ad | %s%d [%an]\" --graph --date=short
53 type = cat-file -t
54 dump = cat-file -p
55 stash = stash save -u # stash even the untracked files, and add a clear message
56
57 compactlog = log --pretty=format:"%Cgreen%h%Creset%x09%Cred%an%Creset%x09%ad%x09%s" --date=short
58 ll = log --pretty=format:"%C(yellow)%h%Cred%d\\ %Creset%s%Cblue\\ [%cn]" --decorate --numstat
59 ls = log --pretty=format:"%C(yellow)%h%Cred%d\\ %Creset%s%Cblue\\ [%cn]" --decorate
60 ld = log --pretty=format:"%C(yellow)%h\\ %ad%Cred%d\\ %Creset%s%Cblue\\ [%cn]" --decorate --date=relative
61 log-diffs = log -u
62 log-me = !UN=$(git config user.name)&& git ld --author="\"$UN\""
63
64 filepath = "!git ls-files | grep -i"
65
66 r = reset
67 r1 = reset HEAD^
68 r2 = reset HEAD^^
69 rh = reset --hard
70 rh1 = reset HEAD^ --hard
71 rh2 = reset HEAD^^ --hard
72
73 [color]
74 ui = always
75 branch = auto
76 diff = auto
77 interactive = auto
78 status = auto
79
80 [commit]
81 template = /home/nsukami/.gitcommitmessagetemplate.txt
82
83 [status]
84 # be careful with that one
85 # showUntrackedFiles = all