Skip to content

Instantly share code, notes, and snippets.

@woelfle
Last active April 17, 2021 19:35
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save woelfle/79dff0f58a63a44f47f3ce88b5b9ac8a to your computer and use it in GitHub Desktop.
Save woelfle/79dff0f58a63a44f47f3ce88b5b9ac8a to your computer and use it in GitHub Desktop.
Git configuration
[user]
name = Thomas Wölfle
email = woelfle@posteo.de
[color]
ui = true
[core]
editor = vim
excludefiles = ~/.gitignore
hooksPath = .githooks
[alias]
alias = config --get-regexp alias
ci = commit
cleanup = "!git branch --merged | grep -v -P '^\\*|master|develop' | xargs -P8 -n1 -r git branch -d; echo Done cleaning local branche."
co = checkout
mc = diff --name-only --diff-filter=U
st = status -sb .
co-all = submodule foreach git checkout
pull-all = submodule foreach git pull
st-all = submodule foreach git st
# Commit all staged/added files to the last commit.
amend = commit --amend --reuse-message=HEAD
# List all commits on the current branch that have not yet been pushed to develop.
ahead-develop = log origin/develop..HEAD
# Diff all commits on the current branch that have not yet been pushed to develop against the remote develop branch
diff-ahead-develop = diff origin/develop..HEAD
# Merge all changes that have been pushed to the develop branch onto the current branch.
update = pull --rebase --autostash -X theirs origin develop
# Rebase to the current state of the develop branch
rebase-develop = pull --rebase origin develop
[fetch]
prune = true
[push]
default = current
[mergetool "vscode"]
cmd = code --wait $MERGED
[merge]
tool = vscode
[diff]
tool = vscode
[difftool "vscode"]
cmd = code --wait --diff $LOCAL $REMOTE
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment