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 | |
if [ -z "$1" ]; then | |
echo usage: newbranch newbranchname oldbranchtoclonefrom | |
exit | |
fi | |
git remote -v | grep upstream > /dev/null | |
if [ $? -ne 0 ]; then | |
echo You must have a remote named upstream |
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
#define dispatchAsyncThenSync(asyncBlock, syncBlock) dispatch_async(dispatch_get_global_queue(DISPATCH_QUEUE_PRIORITY_DEFAULT, 0), ^{ \ | |
asyncBlock(); \ | |
dispatch_async(dispatch_get_main_queue(), ^{ syncBlock(); }); \ | |
}); | |