1+ [user ]
2+ name = Hemerson Vianna
3+ email = hemerson.lourenco@gmail.com
4+
5+ [alias ]
6+ # https://git.wiki.kernel.org/articles/a/l/i/Aliases.html
7+
8+ # General
9+ a = add .
10+ c = commit -m
11+ ca = commit -am
12+ co = checkout
13+ st = status
14+ br = branch
15+ ul = rm --cached
16+ re = rm -r
17+ rt = remote add
18+ rtv = remote -v
19+ rtr = remote rm
20+ ps = push
21+ pl = pull
22+ mg = merge
23+
24+
25+ # Others
26+ psm = push origin master
27+ psum = push -u origin master
28+ pl = pull origin master
29+ ghpage = checkout --orphan gh-pages
30+ type = cat-file -t
31+ dump = cat-file -p
32+ undo = reset --soft HEAD~1
33+
34+ # `git remote prune origin`: remove remote-tracking branches that were deleted from the remote repo
35+ # `git gc`: cleanup unnecessary files and optimize the local repository
36+ # `git clean -df`: remove untracked files and directories from the working tree
37+ # `git stash clear`: remove all stashed states
38+ trim = ! git remote prune origin && git gc
39+ cleanup = ! git clean -df && git stash clear
40+
41+ # Add untracked, remove deleted, and show status
42+ adda = ! git add -A && git status
43+
44+ # Fetch a repository ($1) and checkout its ref ($2) HEAD
45+ browse = ! bash -c ' git fetch "$1" "$2" && git checkout FETCH_HEAD' -
46+
47+ # Find out who is currently active on the repository
48+ # Displays committers in descending order of number of commits
49+ who = shortlog --numbered --summary --email --no-merges --since="3 months"
50+
51+ # Sync Forked repository with original
52+ gsync = git fetch upstream && git checkout master && git merge upstream/master
53+
54+
55+ # Diff & Logs
56+ diffc = diff --cached # Diff what is staged for the next commit
57+ diffst = diff --stat # Diff overview
58+ graph = log --pretty=nice --date-order --graph # Custom graph log (append any tree-ish)
59+ grapha = log --pretty=nice --date-order --graph --all # Custom graph log for all branches
60+ logp = log --pretty=nice --date-order # Custom pretty log
61+ logst = log --stat # Diffstat log
62+ logsf = log --stat --format=oneline --abbrev-commit # Short format diffstat log
63+
64+ [color ]
65+ # color opts: normal, black, red, green, yellow, blue, magenta, cyan, or white
66+ ui = auto
67+ interactive = auto
68+
69+ [core ]
70+ # Use custom `.gitignore` and `.gitattributes`
71+ excludesfile = ~/.gitignore
72+ attributesfile = ~/.gitattributes
73+ editor = subl -W -n
74+
75+ [diff ]
76+ tool = mvimdiff
77+
78+ [difftool ]
79+ prompt = false
80+
81+ [pretty ]
82+ # tut: http://gitimmersion.com/lab_10.html
83+ # ref: http://linux.die.net/man/1/git-log
84+ # Result: <short-sha> <commit-message> (<pointer-names>) -- <commit-author-name>; <relative-time>
85+ nice = " %C(yellow)%h%C(reset) %C(white)%s%C(cyan)%d%C(reset) -- %an; %ar"
86+
87+ [url "git@github.com: "]
88+ insteadOf = " gh:"
89+ pushInsteadOf = " github:"
90+ pushInsteadOf = " git://github.com/"
91+
92+ [url "git://github.com/ "]
93+ insteadOf = " github:"
94+
95+ [url "git@gist.github.com: "]
96+ insteadOf = " gst:"
97+ pushInsteadOf = " gist:"
98+ pushInsteadOf = " git://gist.github.com/"
99+
100+ [url "git://gist.github.com/ "]
101+ insteadOf = " gist:"
0 commit comments