Last active
December 10, 2015 21:08
-
-
Save fabianbraun/4493195 to your computer and use it in GitHub Desktop.
My git config
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
[alias] | |
fixup = !sh -c 'git commit --fixup=$1' - | |
squash = !sh -c 'git commit --squash=$1' - | |
llog = log --date=local | |
gitkconflict = !gitk --left-right HEAD...MERGE_HEAD | |
new = !sh -c 'git log $1@{1}..$1@{0} "$@"' | |
stsh = !CURRENT=$(git symbolic-ref HEAD) && git symbolic-ref HEAD refs/heads/stash && git commit -a -m stashed && git checkout $CURRENT | |
whois = "!sh -c 'git log -i -1 --pretty=\"format:%an <%ae>\n\" --author=\"$1\"' -" | |
whatis = show -s --pretty='tformat:%h (%s, %ad)' --date=short | |
debug = !GIT_PAGER= gdb --args git | |
intercommit = !sh -c 'git show "$1" > .git/commit1 && git show "$2" > .git/commit2 && interdiff .git/commit[12] | less -FRS' - | |
graphviz = "!f() { echo 'digraph git {' ; git log --pretty='format: %h -> { %p }' \"$@\" | sed 's/[0-9a-f][0-9a-f]*/\"&\"/g' ; echo '}'; }; f" | |
st = status | |
ci = commit | |
br = branch | |
co = checkout | |
df = diff | |
lg = log -p | |
who = shortlog -s -- | |
k = !gitk | |
fix-branch = "!f() { git diff origin/refit --name-only --diff-filter=ACMUX | xargs -i php-cs-fixer fix '{}' --config=sf21 ;}; f" | |
pull-current = !git pull origin $(git symbolic-ref --short HEAD) | |
merge-pr = "!sh -c 'git fetch --all && git reset --hard origin/$(git symbolic-ref --short HEAD) && git pull-current && git merge --no-ff -m \"Merged \\#$1\" pr/$1 && phpunit -c app/phpunit.xml.dist && git push origin $(git symbolic-ref --short HEAD)' -" | |
[rebase] | |
autosquash = true | |
[branch] | |
autosetuprebase = always | |
[branch "master"] | |
rebase = true | |
[remote "origin"] | |
fetch = +refs/pull/*/head:refs/remotes/origin/pr/* |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
I updated the script a little bit for more readability and i added a second parameter in merge-pr to add the jira ticket number