Skip to content

Instantly share code, notes, and snippets.

@RyuaNerin
Created August 23, 2015 17:56
Show Gist options
  • Save RyuaNerin/2ddf1b9cdc3a14eb2582 to your computer and use it in GitHub Desktop.
Save RyuaNerin/2ddf1b9cdc3a14eb2582 to your computer and use it in GitHub Desktop.
merge.bash "folder name" "forked git" "orig git"
#!/bin/bash
git clone $2 $1
cd $1
git remote add upstream $3
git fetch upstream
git checkout master
git rebase upstream/master
git push -f origin master
cd ..
rm -rf $1
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment