dotfiles/.gitconfig

181 lines
4.1 KiB
INI
Raw Normal View History

2015-07-06 15:20:24 +00:00
[alias]
2017-05-08 20:49:08 +00:00
## 'New' commands.
create-initial-commit = !git commit -m 'Initial commit' --allow-empty
hard-reset = !git reset --hard $(git upstream)/$(git current-branch)
# 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-
# Create a new branch.
create-new-branch = checkout -b
# Add a commit that fixes another (to be used with `rebase -i`).
fixup = commit --fixup
noff = merge --no-ff
prune = remote prune origin
remotes = remote -v
staged = diff --staged
undo = reset --hard
unstage = reset HEAD --
wipe = clean -fd
word-diff = diff --word-diff
ls = log --pretty=format:"%C(green)%h\\ %C(yellow)[%ad]%Cred%d\\ %Creset%s%Cblue\\ [%cn]" --decorate --date=relative
ll = log --pretty=format:"%C(yellow)%h%Cred%d\\ %Creset%s%Cblue\\ [%cn]" --decorate --numstat
# 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 && \
it checkout $BRANCH && git pull
# Push the current branch upstream to origin using the same branch
# name for the remote branch.
upstream-current-branch = !git push --set-upstream origin \
(git current-branch)
rebase-against-master = !git fetch --all \
& git rebase $(git upstream)/master
rebase-against-develop = !git fetch --all \
& git rebase $(git upstream)/master
## Shorterned 'New' commands.
cic = !git create-initial-commit
red = !git rebase-against-develop
rem = !git rebase-against-master
w = !git word-diff
wip = !git work-in-progress
# Shorterned existing commands.
a = add
aa = add --all --intent-to-add
ap = add --patch
au = add -u
b = branch
bd = branch --delete
c = commit -v
ca = commit --amend
caa = commit --amend -C HEAD
cl = clone --recursive
co = checkout
cop = checkout -p
d = diff
f = fetch --all
g = grep --break --heading
m = merge --ff-only
nb = !git create-new-branch
p = push
rb = rebase
rba = rebase --abort
rbc = rebase --continue
rbi = rebase --interactive
s = status
sb = show-branch -a
dt = difftool
2017-05-08 10:44:29 +00:00
unmerged = branch --no-merged
unmerged-remote = branch --remote --no-merged
2015-07-06 15:20:24 +00:00
2015-10-28 23:51:41 +00:00
[branch]
2017-05-08 20:49:08 +00:00
autosetupmerge = true
autosetuprebase = always
2015-10-28 23:51:41 +00:00
[color]
2017-05-08 20:49:08 +00:00
branch = auto
diff = auto
status = auto
ui = true
2015-10-28 23:51:41 +00:00
2017-01-04 21:20:01 +00:00
[color "branch"]
2017-05-08 20:49:08 +00:00
current = red reverse
local = blue
remote = green
2017-01-04 21:20:01 +00:00
[color "diff"]
2017-05-08 20:49:08 +00:00
meta = yellow
frag = magenta
old = red bold
new = green
plain = white
2017-01-04 21:20:01 +00:00
[color "status"]
2017-05-08 20:49:08 +00:00
added = yellow
changed = green
untracked = cyan
2017-01-04 21:20:01 +00:00
[commit]
2017-05-08 20:49:08 +00:00
verbose = true
2015-07-06 15:20:24 +00:00
[core]
2017-05-08 20:49:08 +00:00
# A global .gitignore file.
excludesFile = ~/.gitignore-global
2015-07-06 15:20:24 +00:00
2015-10-28 23:51:41 +00:00
[diff]
2017-05-08 20:49:08 +00:00
tool = vimdiff
2015-07-06 15:20:24 +00:00
[fetch]
2017-05-08 20:49:08 +00:00
# Always prune when fetching (and pulling).
prune = true
2015-07-06 15:20:24 +00:00
2015-10-28 23:51:41 +00:00
[gitsh]
2017-05-08 20:49:08 +00:00
nogreeting = true
2015-10-28 23:51:41 +00:00
[grep]
2017-05-08 20:49:08 +00:00
# Show the line numbers in the output.
lineNumber = true
2015-10-28 23:51:41 +00:00
2015-07-06 15:20:24 +00:00
[help]
2017-05-08 20:49:08 +00:00
autocorrect = 1
2015-07-06 15:20:24 +00:00
2015-10-28 23:51:41 +00:00
[include]
2017-05-08 20:49:08 +00:00
path = ~/.gitconfig-local
2015-10-26 20:54:35 +00:00
[rebase]
2017-05-08 20:49:08 +00:00
autosquash = true
autostash = true
2015-10-28 23:51:41 +00:00
[rerere]
2017-05-08 20:49:08 +00:00
# Store and re-use manual conflict resolution changes.
enabled = true
2015-11-16 13:46:56 +00:00
[push]
2017-05-08 20:49:08 +00:00
# Push the current branch to update a branch with the same name on the
# receiving end.
default = current
2016-01-14 18:27:01 +00:00
[url "https://github.com/"]
2017-05-08 20:49:08 +00:00
insteadOf = gh:
2016-01-14 18:27:01 +00:00
[url "https://gist.github.com/"]
2017-05-08 20:49:08 +00:00
insteadOf = gist:
2016-01-14 18:27:01 +00:00
[url "https://bitbucket.org/"]
2017-05-08 20:49:08 +00:00
insteadOf = bb:
2016-01-14 18:28:19 +00:00
2016-01-14 22:19:35 +00:00
[url "https://git.drupal.org/project/"]
2017-05-08 20:49:08 +00:00
# Clone from drupal.org using "git clone do:{name}"
# or "git clone drupal:{name}".
insteadOf = do:
insteadOf = drupal:
2016-01-14 22:19:35 +00:00
2016-01-14 18:28:19 +00:00
[pull]
2017-05-08 10:44:29 +00:00
ff = only
2017-05-08 20:49:08 +00:00
rebase = true
2016-01-14 18:35:40 +00:00
[merge]
2017-05-08 20:49:08 +00:00
defaultToUpstream = true
2017-05-08 10:44:29 +00:00
ff = false