dotfiles/.gitconfig

123 lines
3 KiB
INI
Raw Normal View History

2015-10-04 20:44:34 +00:00
[include]
2015-10-28 23:48:36 +00:00
path = ~/.gitconfig-local
2015-10-04 20:44:34 +00:00
2015-07-06 15:20:24 +00:00
[color]
2015-10-28 23:48:36 +00:00
ui = true
2015-07-06 15:20:24 +00:00
[color "branch"]
2015-10-28 23:48:36 +00:00
current = yellow bold
local = green bold
remote = cyan bold
2015-07-06 15:20:24 +00:00
[color "diff"]
2015-10-28 23:48:36 +00:00
meta = yellow bold
frag = magenta bold
old = red bold
new = green bold
whitespace = red reverse
2015-07-06 15:20:24 +00:00
[color "status"]
2015-10-28 23:48:36 +00:00
added = green bold
changed = yellow bold
untracked = red bold
2015-07-06 15:20:24 +00:00
[branch]
2015-10-28 23:48:36 +00:00
autosetupmerge = true
autosetuprebase = always
2015-07-06 15:20:24 +00:00
[alias]
2015-10-28 23:48:36 +00:00
aa = add --all
ap = add --patch
b = branch -v
bv = branch -vv
bd = branch -d
c = commit -v
ca = !git c --amend
caa = !git ca -a -C HEAD
cam = !git c -am
cf = commit --fixup
cl = clone
cm = !git c -m
co = checkout
cop = checkout -p
ds = diff --stat
f = fetch
g = grep --break --heading --line-number
create-initial-commit = !git commit -m 'Initial commit' --allow-empty
l = log --oneline --graph --decorate
la = !git l --all
noff = merge --no-ff
prb = pull --rebase
ra = rebase --abort
ri = rebase --interactive
rc = rebase --continue
s = status --short --branch
staged = diff --staged
undo = reset --hard
unstage = reset HEAD --
wipe = clean -fd
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 master && 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-
push-current-branch = !git push -u $(git upstream) $(git current-branch)
2015-10-28 23:48:36 +00:00
# Shorter commands.
cic = !git create-initial-commit
mod = !git merge-origin-develop
mom = !git merge-origin-master
2015-07-06 15:20:24 +00:00
[core]
2015-10-28 23:48:36 +00:00
# A global .gitignore file.
excludesFile = ~/.gitignore-global
2015-07-06 15:20:24 +00:00
[grep]
2015-10-28 23:48:36 +00:00
# Show the line numbers in the output.
lineNumber = true
#
patternType = extended
2015-07-06 15:20:24 +00:00
[fetch]
2015-10-28 23:48:36 +00:00
# Always prune when fetching (and pulling).
prune = 1
2015-07-06 15:20:24 +00:00
[help]
2015-10-28 23:48:36 +00:00
autocorrect = 1
# Open Git help pages in a browser as HTML.
format = web
2015-07-06 15:20:24 +00:00
2015-10-04 20:44:34 +00:00
[rerere]
2015-10-28 23:48:36 +00:00
# Store and re-use manual conflict resolution changes.
enabled = 1
2015-10-04 20:44:34 +00:00
2015-07-06 15:20:24 +00:00
[gitsh]
2015-10-28 23:48:36 +00:00
nogreeting = true
2015-07-06 15:20:24 +00:00
[diff]
2015-10-28 23:48:36 +00:00
tool = vimdiff
2015-10-26 20:54:35 +00:00
[rebase]
2015-10-28 23:48:36 +00:00
autosquash = true
autostash = true