Created
September 10, 2012 03:52
-
-
Save claudijd/3688776 to your computer and use it in GitHub Desktop.
Syncing my metasploit-framework fork with upstream-master
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
#Just a simple script to sync master with upstream-master | |
#Set rapid7 as remote upstream | |
puts "[+] Setting Rapid7 as upstream remote" | |
`git remote add upstream git://github.com/rapid7/metasploit-framework.git` | |
#Get all the upstream changes | |
puts "[+] Grabbing upstream remote changes" | |
`git fetch upstream` | |
#Switch to the upstream master | |
puts "[+] Create and Switch to upstream-master" | |
`git checkout -b upstream-master` | |
`git checkout upstream-master` | |
#Switch over to master | |
puts "[+] Switch to fork master" | |
`git checkout master` | |
#Get all changes from master | |
puts "[+] Grabbing master changes" | |
`git fetch` | |
#Rebase against local checkout of upstream master | |
puts "[+] Rebasing fork's master with upstream-master" | |
`git rebase upstream-master` | |
#Push rebased master to github | |
puts "[+] Pushing changes to fork's master" | |
`git push origin master` |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment