Skip to content

Instantly share code, notes, and snippets.

@bootleq
Created April 4, 2014 08:31
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save bootleq/9970494 to your computer and use it in GitHub Desktop.
Save bootleq/9970494 to your computer and use it in GitHub Desktop.
Currently in use messy ~/.gitconfig
[user]
name = bootleq
email = bootleq@gmail.com
[color]
ui = auto
; [help]
; format = web
[log]
abbrevCommit = true
[core]
editor = vim
excludesFile = ~/.gitignore
[push]
; git 2.0 以前預設為 matching, 會將所有同名 branch push 出去
; git 1.7.6 以前可以用 tracking,等於以後的 upstream
; git 1.7.11 以後預設為 simple
default = tracking
default = simple
[credential]
helper = cache --timeout=3600
[clean]
requireForce = false
[rerere]
enabled = true
; https://git.wiki.kernel.org/index.php/Aliases
[alias]
amend = "commit --amend"
st = stash
rb = rebase
edit-unmerged = "!f() { git ls-files --unmerged | cut -f2 | sort -u ; }; vim -p `f` -c '/^=======$'"
delete-unmerged = "!f() { git ls-files --unmerged | cut -f2 | sort -u ; }; rm `f`"
pick-theirs = "!f() { git ls-files --unmerged | cut -f2 | sort -u ; }; git checkout --theirs `f`"
pick-ours = "!f() { git ls-files --unmerged | cut -f2 | sort -u ; }; git checkout --ours `f`"
peeps = !git log --pretty=format:%aN | sort | uniq -c | sort -rn
graph = log --graph --pretty=format:'%Cred%h%Creset -%C(yellow)%d%Creset %s %Cgreen(%cr) %C(bold blue)<%an>%Creset' --abbrev-commit
lg = log --graph --pretty=format:'%Cred%h%Creset -%C(yellow)%d%Creset %s %Cgreen(%cr) %C(bold blue)<%an>%Creset' --abbrev-commit
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment