Last active
August 29, 2015 14:00
-
-
Save adelegard/11192769 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
| #!/bin/bash | |
| # This script will move the last commit of your personal (computer name) branch back into master as uncommitted changes, | |
| # then delete that branch | |
| # This is intended to be used at the very start of the workday to continue working where you left off | |
| git checkout $(uname -n) --quiet && | |
| git reset HEAD~1 --quiet && | |
| git stash >/dev/null && | |
| git checkout master --quiet && | |
| git stash pop >/dev/null && | |
| git branch -D $(uname -n) --quiet && | |
| git push origin :$(uname -n) --quiet |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment