[user]
name = Adolfo De Unánue
mail = [email protected]
email = [email protected]
[core]
editor = emacsclient -t
whitespace = fix,-indent-with-non-tab,trailing-space,cr-at-eol
excludesfile = ~/.gitignore
pager = diff-so-fancy | less --tabs=4 -RFX
[web]
browser = chrome
[instaweb]
httpd = apache2 -f
[rerere]
enabled = 1
autoupdate = 1
[color]
ui = true
[color "branch"]
current = yellow bold
local = green bold
remote = cyan bold
[color "diff"]
meta = yellow
frag = magenta bold
commit = yellow bold
old = red bold
new = green bold
whitespace = red reverse
[color "diff-highlight"]
oldNormal = red bold
oldHighlight = red bold 52
newNormal = green bold
newHighlight = green bold 22
[color "status"]
added = green bold
changed = yellow bold
untracked = red bold
[diff]
tool = meld
submodule = log
[github]
user = nanounanue
[push]
default = current
[merge]
tool = meld
[branch]
autoSetupMerge = always
## Trick from http://michaelwales.com/articles/make-gitconfig-work-for-you/
## You can use it as git clone gh:nanounanue/test
[url "https://github.com/"]
insteadOf = gh:
[url "https://gist.github.com/"]
insteadOf = gist:
[url "https://bitbucket.org/"]
insteadOf = bb:
[status]
submoduleSummary = true
[alias]
co = checkout
cot = "!f() { git branch | grep $1 | xargs -I {} git co {}; }; f"
b = branch
pu = push -u origin HEAD
ci = commit
st = status
ap = add --patch
rename = branch -m
rn = rename
clean-merged = ! git branch --merged | egrep -v \"(^\\*|master|dev)\" | xargs git branch -d
age = for-each-ref --sort=committerdate refs/heads/ --format='%(HEAD) %(color:yellow)%(refname:short)%(color:reset) - %(color:red)%(objectname:short)%(color:reset) - %(contents:subject) - %(authorname) (%(color:green)%(committerdate:relative)%(color:reset))'
## Taken from http://michaelwales.com/articles/make-gitconfig-work-for-you/
# Add and remove all changes, note how this alias is calling another alias
addremove = !git r && git add . --all
# Show all of my configured aliases
aliases = !git config --list | grep 'alias\\.' | sed 's/alias\\.\\([^=]*\\)=\\(.*\\)/\\1\\ \t => \\2/' | sort
# For when you made that commit a bit too early, amend
amend = !git log -n 1 --pretty=tformat:%s%n%n%b | git commit -F - --amend
# Show all branches
br = branch -av
# Show the current branch name (usefull for shell prompts)
brname = !git branch | grep "^*" | awk '{ print $2 }'
# Delete a branch
brdel = branch -D
# Which files are receiving the most "love"
churn = !git log --all -M -C --name-only --format='format:' "$@" | sort | grep -v '^$' | uniq -c | sort | awk 'BEGIN {print "count,file"} {print $1 "," $2}'
# View the log and diff for a commit (previous if no SHA1 provided)
details = log -n1 -p --format=fuller
# Save a repo as a tarball
export = archive -o latest.tar.gz -9 --prefix=latest/
# Unstage changes from the index
unstage = reset HEAD --
# View a pretty git log with branch tree
g = !git log --graph --pretty=format:'%Cred%h%Creset -%C(yellow)%d%Creset %s %Cgreen(%cr) %C(bold blue)<%an>%Creset' --abbrev-commit --date=relative
# Return a list of commit SHA1s
l = "!f() { git log $* | grep '^commit ' | cut -f 2 -d ' '; }; f"
# Remove deleted files
r = !git ls-files -z --deleted | xargs -0 git rm
# Return the repository's root directory (usefull for shell prompts)
root = rev-parse --show-toplevel
# Update all submodules
subup = submodule update --init
# List all tags
tags = tag -l
# Start a new local repository and perform initial commit
this = !git init && git add . && git commmit -m \"Initial commit.\"
# Thin out older metadata within the repository, reduceses filesystem footprint
trim = !git reflog expire --expire=now --all && git gc --prune=now
## Taken from https://gist.github.com/pksunkara/988716
ours = "!f() { git checkout --ours $@ && git add $@; }; f"
theirs = "!f() { git checkout --theirs $@ && git add $@; }; f"
#############
whois = "!sh -c 'git log -i -1 --pretty=\"format:%an <%ae>\n\" --author=\"$1\"' -"
whatis = show -s --pretty='tformat:%h (%s, %ad)' --date=short
#############
barebranch = !sh -c 'git symbolic-ref HEAD refs/heads/$1 && git rm --cached -r . && git clean -xfd' -
flat = clone --depth 1
subpull = !git submodule foreach git pull --tags origin master
subrepo = !sh -c 'filter-branch --prune-empty --subdirectory-filter $1 master' -
human = name-rev --name-only --refs=refs/heads/*
serve = !git daemon --reuseaddr --verbose --base-path=. --export-all ./.git
snapshot = !git stash save "snapshot: $(date)" && git stash apply "stash@{0}"
[gitflow "prefix"]
feature = feature-
release = release-
hotfix = hotfix-
support = support-
versiontag = v
# Compiled source #
###################
*.com
*.class
*.dll
*.exe
*.o
*.so
# Temporary files #
###################
*.swp
*.swo
*~
# Packages #
############
*.7z
*.dmg
*.gz
*.iso
*.jar
*.rar
*.tar
*.zip
# Logs and databases #
######################
*.log
*.sqlite
# OS generated files #
######################
.DS_Store*
ehthumbs.db
Icon?
Thumbs.db