Home » Eclipse Projects » EGit / JGit » repo cloned from "origin", now not certain how to properly switch to fork/master
repo cloned from "origin", now not certain how to properly switch to fork/master [message #1715759] |
Wed, 25 November 2015 18:39 |
David M. Karr Messages: 801 Registered: July 2009 |
Senior Member |
|
|
I originally cloned a github repo to my desktop and in Eclipse, I imported projects from that cloned repo.
In Github, I then forked the github repo and created a branch.
In Eclipse, I created a remote pointing to the fork (called "fork") with a fetch config. I did a fetch, and that created the fork/master and fork/branch (where "branch" is the name of the branch I created on github).
I then switched to fork/branch and made some changes. I commited those changes and pushed to my branch on github. I created a PR for those changes on the original project, and those changes were merged.
Now, I want the "master" for my fork to have the latest changes, essentially merging fork/branch to fork/master (in the terms of what I see in Eclipse).
I attempted to do this by first switching to "fork/master". I thought I had done this, and then merged the local branch. This worked, but when I attempted to push these commited changes, I realized that I was actually on the "origin/master" branch, not "fork/master", because the push failed for "insufficient permissions", and it showed the origin project's github url, which made me realize it was going to the wrong "master".
I looked again in Eclipse, and specifically selected "fork/master" in the "Switch to" dialog, and clicked "Checkout".
On the next dialog, which gave me the choice of "Checkout commit" and "Checkout as new local branch" (that first label seems very ambiguous), I selected the latter.
At this point, I get the "Create Branch" dialog, with "Source" set to fork/master, "Branch Name" set to "master", and with an error message up at top saying "Ref refs/head/master already exists".
I guess that's reasonable. At this point, should I give it a different name, like "forkmaster"? Will that create other problems I'll have to deal with?
|
|
| | |
Goto Forum:
Current Time: Sat Apr 20 03:07:15 GMT 2024
Powered by FUDForum. Page generated in 0.02790 seconds
|