Created
May 6, 2009 12:25
-
-
Save kjwierenga/107502 to your computer and use it in GitHub Desktop.
steps required to bring fork of rufus-scheduler in sync again after branch renaming
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
# | |
# Steps I took to re-sync my fork of rufus-scheduler to the | |
# new branches on jmettraux/rufus-scheduler after the following renames: | |
# | |
# master -> onezero | |
# twozero -> master | |
# | |
$ git clone git@github.com:kjwierenga/rufus-scheduler.git # fresh clone of my fork | |
$ cd rufus-scheduler | |
(master) $ git remote add upstream git://github.com/jmettraux/rufus-scheduler.git | |
(master) $ git remote update | |
(master) $ git branch -a | |
* master | |
origin/HEAD | |
origin/master # should be rename to onezero | |
origin/twozero # should be renamed to master | |
upstream/master # the new master (used to be twozero) | |
upstream/onezero # the onezero branch (used to be master) | |
(master) $ git checkout -b twozero origin/twozero # get the old twozero branch | |
Branch twozero set up to track remote branch refs/remotes/origin/twozero. | |
Switched to a new branch "twozero" | |
(twozero) $ git branch -m master old_master # move old master out of the way | |
(twozero) $ git branch -m twozero master # rename twozero to master | |
master) $ git branch -a | |
* master | |
old_master | |
origin/HEAD | |
origin/master | |
origin/twozero | |
upstream/master | |
upstream/onezero | |
(master) $ git branch -m old_master onezero # rename old_master to onezero | |
(master) $ git branch -a | |
* master | |
onezero | |
origin/HEAD | |
origin/master | |
origin/twozero | |
upstream/master | |
upstream/onezero | |
(master) $ git push origin :master # remove old master | |
To git@github.com:kjwierenga/rufus-scheduler.git | |
- [deleted] master | |
(master) $ git push origin master:refs/heads/master # push the new master to my fork | |
error: refs/remotes/origin/HEAD points nowhere! | |
Total 0 (delta 0), reused 0 (delta 0) | |
To git@github.com:kjwierenga/rufus-scheduler.git | |
* [new branch] master -> master | |
(master) $ git push origin :twozero # remove old twozero | |
To git@github.com:kjwierenga/rufus-scheduler.git | |
- [deleted] twozero | |
master) $ git push origin onezero:refs/heads/onezero # push new onezero to my fork | |
Counting objects: 58, done. | |
Compressing objects: 100% (25/25), done. | |
Writing objects: 100% (43/43), 12.68 KiB, done. | |
Total 43 (delta 23), reused 36 (delta 17) | |
To git@github.com:kjwierenga/rufus-scheduler.git | |
* [new branch] onezero -> onezero | |
(master) $ git branch -a | |
* master | |
onezero | |
origin/HEAD | |
origin/master | |
origin/onezero | |
upstream/master | |
upstream/onezero | |
# now structure of my fork is same as upstream |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment