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
forksync() { | |
if [ ! -d ".git" ]; then | |
echo "Make sure your in the root of a github repo." | |
return | |
fi | |
if cat .git/config | grep -q 'remote "upstream"' .git/config; then | |
git add . | |
git stash | |
git fetch upstream | |
git rebase upstream/master |