Permalink
Branch: master
Find file Copy path
Fetching contributors…
Cannot retrieve contributors at this time
132 lines (123 sloc) 4.57 KB
[user]
name = Hector Rivas Gandara
email = keymon@gmail.com
[alias]
a = add
c = clone
t = tag
au = add -u .
ap = add -p
br = branch -v
bl = blame
cl = clean
clf = clean --force
sh = show
sb = show-branch
ds = diff --stat
ls = ls-files
lo = log
st = status
co = checkout
cp = cherry-pick
ci = commit -v
df = diff
rb = rebase
rbc = rebase --continue
rbs = rebase --skip
rbi = rebase --interactive
me = merge
rs = remote show
sb = show-branch
pu = pull
pur = pull --rebase
pus = submodule foreach git pull origin master
purs = pull --recurse-submodules
pt = push --tags
w = whatchanged
dfs = diff --staged
sts = status -s
rl = reflog
ref = reflog
rst = reset
rt = remote
sm = submodule
sms = submodule status
smi = submodule init
smu = submodule update
smf = submodule foreach
rup = remote update
rpr = remote prune
cia = commit -v -a
com = checkout master
detach = checkout HEAD^0
info = config --list
summary = log --oneline
rank = shortlog -sn --no-merges
tree = log --graph --oneline --decorate
pom = push origin master
pob = !sh -c 'git push origin $(git branch -l 2> /dev/null | sed -e \"/^[^*]/d\" -e \"s/* \\(.*\\)/\\1/\")'
# Push origin force curreny branch
pof = !sh -c 'git push --force-with-lease origin $(git rev-parse --abbrev-ref HEAD)'
amend = commit --amend
last = log --oneline -10
review = log --stat=160,180 -p -w --patience --reverse -M -C -C -c
undo = reset --hard
lg1 = log --graph --abbrev-commit --decorate --date=relative --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
lg = !"git lg1"
# From http://blogs.atlassian.com/2014/10/advanced-git-aliases/
# Show commits since last pull
new = log HEAD@{1}..HEAD@{0}
# Add uncommitted and unstaged changes to the last commit
caa = commit -a --amend -C HEAD
pickaxe = log -p -S
# Remove merged branches or branches not in the remote
clean-branches = !"git fetch -p && git branch --merged | grep -v '\\*' | xargs -n 1 git branch -D && git remote | xargs -n1 git remote prune"
# List branches ordered by date
ls-branch = !git-ls-branch
# Pick a branch from a list of branches with the interactive tool peco
peco = !"git ls-branch | peco | head -n1 | awk '{print $4}' | sed 's/\\x1b\\[[0-9;]*m//g' | xargs -n1 git checkout"
# show current hash
hash = log --pretty=format:'%h %H' -n 1
# Fixup the changes of a given file with the latest commit that changed it
# Trick for positional args: https://stackoverflow.com/a/3322412/395686
fixupfile = "!f() { git commit --fixup=$(git log --all --full-history -1 --format=format:%h -- \"$1\") \"$@\";}; f"
# Select the commit to fixup compared to master
pecofix = !"git commit --fixup $(git log --oneline master..HEAD | peco | head -n1 | awk '{print $1}')"
# duet-rebase: Rebase reseting commiters with duet
duet-rebase = rebase --exec 'git duet-commit --amend --reset-author --no-edit'
# duet-rebase-rotate: Rebase reseting commiters with duet
duet-rebase-rotate = rebase --exec 'GIT_DUET_ROTATE_AUTHOR=1 git duet-commit --amend --reset-author --no-edit'
[color]
branch = auto
diff = auto
status = auto
interactive = auto
ui = true
pager = true
[pack]
threads = 0
[rename]
limit = 0
[merge]
log = true
[core]
pager = less -FRSX
excludesfile = ~/.global_gitignore
[push]
default = current
[giggle]
main-window-maximized = true
main-window-view = HistoryView
[init]
templatedir = ~/.git-templates
[color "diff"]
whitespace = red reverse
[http]
cookiefile = /Users/keymon/.gitcookies
[rebase]
autosquash = true
[include]
path = ~/.gitconfig.local
[diff]
wsErrorHighlight = all