git alias to see last commit
[dotfiles] / .gitconfig
1 [user]
2 name = patrick nsukami
3 email = ndkpatt@gmail.com
4
5 [core]
6 excludesfile = /home/nsukami/.gitignore
7 editor = emacs
8 autocrlf = input
9
10 [alias]
11 last = log -1 HEAD
12 list-assumed-unchanged = !git ls-files -v | grep "^[[:lower:]]"
13 lol = log --graph --decorate --pretty=oneline --abbrev-commit
14 lola = log --graph --decorate --pretty=oneline --abbrev-commit --all
15 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
16 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
17 lg = !"git lg1"
18 undo-commit = reset --soft HEAD^
19 create-branch-from-stash = !git stash branch
20 undo-add = reset HEAD
21 undo-modif = checkout
22 assume-unchanged = update-index --assume-unchanged
23 no-more-assume-unchanged = update-index --no-assume-unchanged
24 #list-files-assumed-unchanged = ls-files -v | grep "^[^H]"
25 delete-local-branch = branch -d
26 create-branch = checkout -b
27 goto-branch = checkout
28 fix-latest-commit = commit --amend
29 rename-branch = branch -m
30 ch = checkout
31 co = commit
32 st = status
33 br = branch
34 hist = log --pretty=format:\"%h %ad | %s%d [%an]\" --graph --date=short
35 type = cat-file -t
36 dump = cat-file -p
37 stash = stash save -u # stash even the untracked files, and add a clear message
38 dc = diff --cached
39 compactlog = log --pretty=format:"%h%x09%an%x09%ad%x09%s" --date=short
40 ls = ls-files
41
42
43 [color]
44 ui = always
45 branch = auto
46 diff = auto
47 interactive = auto
48 status = auto
49
50 [commit]
51 template = /home/nsukami/.gitcommitmessagetemplate.txt
52
53 [status]
54 # be careful with that one
55 # showUntrackedFiles = all