Skip to content

Instantly share code, notes, and snippets.

View gabeart10's full-sized avatar

Gabriel Miller gabeart10

View GitHub Profile
@donovank
donovank / forksync.sh
Created April 29, 2017 19:32
Forksync, a bash function to sync forked repos easily.
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