Last active
January 3, 2016 19:49
-
-
Save hahmed/8511092 to your computer and use it in GitHub Desktop.
Git stuff
This file contains hidden or 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
| #DangerZone so be sure to "back up" your current work by creating a new branch. | |
| git co org-teams | |
| git branch org-teams-bak | |
| You should have a remote named upstream that points to the original octokit repository. To very, run: | |
| git remote -v | |
| If you don't have a remote named upstream, you can run this command: | |
| git remote add upstream https://github.com/octokit/octokit.net.git | |
| Now we're ready to go. All we need to do is fetch the upstream master now and rebase against it. | |
| git fetch upstream | |
| git rebase upstream/master | |
| After that, you can force push to your branch. | |
| git push origin org-teams --force | |
| Keep in mind, force pushing is a bad idea for shared branches. Only do this for a branch that you're the only one committing to. :smile: | |
| We can simply get back to your original state like so: | |
| git co org-teams-bak | |
| git branch -D org-teams | |
| git co -b org-teams | |
| git push origin org-teams --force | |
| Then try this. Let's get your local master up to date with upstream master. | |
| git co master | |
| git fetch upstream | |
| git reset upstream/master --hard | |
| git push origin master | |
| This should get your fork's master up to date with what's on octokit/octokit.net. | |
| Then, you can simply do this: | |
| git co org-teams | |
| git merge master | |
| That'll merge master into your branch. You'll need to deal with any conflicts along the way. | |
| Then | |
| git push origin org-teams |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment