Advertisement
Guest User

Untitled

a guest
Aug 31st, 2015
70
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.49 KB | None | 0 0
  1. SOURCE_BRANCH=`git rev-parse --abbrev-ref HEAD`
  2.  
  3. syncBranch(){
  4. echo "Syncing to $1 $2"
  5. DEST_BRANCH=$1
  6. DEST_REMOTE=$2
  7. git checkout $DEST_BRANCH
  8.  
  9. # Make sure we actually made it to the destination branch
  10. if [ `git rev-parse --abbrev-ref HEAD` != $DEST_BRANCH ]; then
  11. echo "!!!! Something went wrong check the errors above and try again !!!!"
  12. exit 0
  13. fi
  14.  
  15. git push $DEST_REMOTE $DEST_BRANCH --force
  16. }
  17.  
  18. syncBranch master wcccedu
  19. syncBranch gh-pages wcccedu
  20.  
  21. git checkout $SOURCE_BRANCH
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement