Last active
August 29, 2015 14:15
-
-
Save lslinnet/1f7cd6306cff863940c6 to your computer and use it in GitHub Desktop.
.gitconfig and .gitignore files I use - based of drupal git configuration and a few other areas
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Sample gitconfig | |
# | |
# If you have hub install (github helper scripts) | |
[hub] | |
protocol = https | |
[user] | |
name = <your name as you want it in git commits> | |
email = <your email> | |
[branch] | |
autosetuprebase = always | |
# If you use OSX then this helps | |
[credential] | |
helper = osxkeychain | |
[color] | |
diff = auto | |
status = auto | |
branch = auto | |
ui = true | |
[core] | |
excludesfile = ~/.gitignore | |
editor = vim | |
autocrlf = false | |
safecrlf = false | |
ignorecase = false | |
[apply] | |
whitespace = nowarn | |
[mergetool] | |
keepBackup = false | |
[difftool] | |
prompt = false | |
[help] | |
autocorrect = 1 | |
[push] | |
# See `git help config` (search for push.default) | |
# for more information on different options of the below setting. | |
# | |
# Setting to git 2.0 default to surpress warning message | |
default = simple | |
[merge] | |
ff = false | |
[diff] | |
renames = copies | |
algorithm = patience | |
renamelimit = 9720 | |
# Aliases are selective, use those you think make sense. | |
[alias] | |
co = checkout | |
count = !git shortlog -sn | |
promote = !$ZSH/bin/git-promote | |
wtf = !$ZSH/bin/git-wtf | |
rank-contributers = !$ZSH/bin/git-rank-contributers | |
count = !git shortlog -sn | |
a = apply --index | |
lg = log --color --graph --pretty=format:'%Cred%h%Creset -%C(yellow)%d%Creset %s %Cgreen(%cr) %C(bold blue)<%an>%Creset' --abbrev-commit -- | |
df = diff -M25% | |
p = format-patch --stdout | |
assume = update-index --assume-unchanged | |
unassume = update-index --no-assume-unchanged | |
assumed = "!git ls-files -v | grep ^h | cut -c 3-" | |
snapshot = !git stash save "snapshot: $(date)" && git stash apply "stash@{0}" | |
ours = "!f() { git checkout --ours $@ && git add $@; }; f" | |
theirs = "!f() { git checkout --theirs $@ && git add $@; }; f" | |
st = status |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
.DS_Store | |
.svn | |
*~ | |
*.swp | |
*.rbc | |
.idea |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment