Created
January 20, 2012 01:45
-
-
Save cheecheeo/1644467 to your computer and use it in GitHub Desktop.
arcanist+git pushing and cleanup
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/bash -x | |
# Assuming you're using the 'mutable history' workflow (rebases everywhere), | |
# run this script from a branch that's been accepted in Differential to | |
# 'arc amend' the branch, rebase the code onto master, push up the changes, | |
# and delete the branch. | |
current_branch=$(git name-rev --name-only HEAD) | |
git fetch && git checkout master && git pull -r && | |
git checkout $current_branch && | |
git rebase master && arc amend && | |
# Also checks out master | |
git rebase $current_branch master && | |
git push && git branch -d $current_branch |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment