dotfiles/.gitconfig

109 lines
2.9 KiB
INI
Raw Normal View History

2015-10-04 20:44:34 +00:00
[include]
path = ~/.gitconfig-local
2015-07-06 15:20:24 +00:00
[color]
ui = true
[color "branch"]
current = yellow bold
local = green bold
remote = cyan bold
[color "diff"]
meta = yellow bold
frag = magenta bold
old = red bold
new = green bold
whitespace = red reverse
[color "status"]
added = green bold
changed = yellow bold
untracked = red bold
[branch]
autosetupmerge = true
2015-10-04 20:44:34 +00:00
autosetuprebase = always
2015-07-06 15:20:24 +00:00
[alias]
aa = add --all
ap = add --patch
br = branch
c = commit -v
2015-10-04 20:44:34 +00:00
ca = !git c --amend
caa = !git ca -a -C HEAD
cam = !git c -am
2015-07-06 15:20:24 +00:00
cl = clone
2015-10-04 20:44:34 +00:00
cm = !git c -m
2015-07-06 15:20:24 +00:00
co = checkout
2015-10-04 20:44:34 +00:00
cp = checkout -p
2015-07-06 15:20:24 +00:00
f = fetch
g = grep --break --heading --line-number
2015-10-04 20:44:34 +00:00
l = log --oneline --graph --decorate
la = !git l --all
noff = merge --no-ff
2015-07-06 15:20:24 +00:00
prb = pull --rebase
ra = rebase --abort
rc = rebase --continue
2015-10-04 20:44:34 +00:00
s = status --short --branch
staged = diff --staged
2015-07-06 15:20:24 +00:00
undo = reset --hard
unstage = reset HEAD --
2015-08-06 09:04:17 +00:00
wipe = clean -fd
2015-10-04 20:44:34 +00:00
word-diff = diff --word-diff
# Print the name of the current branch.
current-branch = symbolic-ref --short HEAD
# Print the name of the current upstream tracking branch.
upstream = !git config --get branch.$(git current-branch).remote \
|| echo origin
# Checkout the latest develop branch and update it.
pull-develop = !git checkout develop && git pull --rebase
# Checkout the latest master branch and update it.
pull-master = !git checkout develop && git pull --rebase
# Update the develop, master and current branches.
pull-develop-master-current-branch = !BRANCH=$(git current-branch) && \
git fetch --all && git pull-develop && git pull-master && \
git checkout $BRANCH && git pull
# Fetch and merge the latest changes from the develop branch.
merge-origin-develop = !git fetch origin && git merge origin/develop
# Fetch and merge the latest changes from the master branch.
merge-origin-master = !git fetch origin && git merge origin/master
# Assume the specified file is unchanged to stop changes
# being seen by Git
assume = update-index --assume-unchanged
# No longer assume a specified file remains unchanged
unassume = update-index --no-assume-unchanged
# List all files that are assumed to be unchanged
assumed = !git ls-files -v | grep '^[hsmrck?]' | cut -c 3-
# Shorter commands.
mod = !git merge-origin-develop
mom = !git merge-origin-master
2015-07-06 15:20:24 +00:00
[core]
2015-10-04 20:44:34 +00:00
# A global .gitignore file.
2015-07-06 15:20:24 +00:00
excludesFile = ~/.gitignore-global
[grep]
2015-10-04 20:44:34 +00:00
# Show the line numbers in the output.
2015-07-06 15:20:24 +00:00
lineNumber = true
2015-10-04 20:44:34 +00:00
#
2015-07-06 15:20:24 +00:00
patternType = extended
[fetch]
2015-10-04 20:44:34 +00:00
# Always prune when fetching (and pulling).
prune = 1
2015-07-06 15:20:24 +00:00
[help]
autocorrect = 1
2015-10-04 20:44:34 +00:00
[rerere]
# Store and re-use manual conflict resolution changes.
enabled = 1
2015-07-06 15:20:24 +00:00
[gitsh]
nogreeting = true
[diff]
tool = vimdiff