Last active
December 20, 2015 20:49
-
-
Save pferreir/6193091 to your computer and use it in GitHub Desktop.
This file contains hidden or 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
# Add to project-level .git/config | |
[wip] | |
public = name-of-your-github-remote | |
# Add to global .gitconfig | |
[wip] | |
webhook = http://indicotest1.cern.ch:8000/wip/notification/ | |
[alias] | |
push-wip = "!pushit() { export BRANCH=\"$(git-rev-parse --symbolic-full-name --abbrev-ref HEAD)\"; export REMOTE=\"$(git config --get wip.public)\"; export WEB_HOOK=\"$(git config --get wip.webhook)\" ; git-push $REMOTE $1 \"$BRANCH:wip/$BRANCH\" 2>&1 | tee /dev/tty | grep -q 'To ' && curl -sS $WEB_HOOK --data-urlencode \"branch=$BRANCH\" --data-urlencode \"name=$(git config --get user.name)\" --data-urlencode \"remote=`git remote show -n $REMOTE | sed -n 2p | sed 's/.*[:\\/]\\([a-zA-Z0-9\\-]*\\)\\/\\(.*\\)\\.git/\\1\\/\\2/'`\" > /dev/null ;}; pushit" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment