Last active
April 21, 2018 03:15
-
-
Save msh5/c73ac86e645deff00678ee843e889bda to your computer and use it in GitHub Desktop.
Push on-editing files as a WIP branch for sharing with an another machine.
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
#!/bin/sh | |
# curl https://gist.githubusercontent.com/msh5/c73ac86e645deff00678ee843e889bda/raw/git-wip-push.sh | sh | |
set -e | |
set -u | |
orgbr="$(git rev-parse --abbrev-ref @)" | |
wipbr="wip-$(date +%Y%m%d%H%M%S)" | |
git checkout -b $wipbr | |
git commit -a -m "wip" | |
git push origin $wipbr | |
git checkout $orgbr |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment