I can not push my engaged branch to my clitched github fork, and I can not find my Github fork

advertisements

I'm confused. I'm still new to git and github.

Almost a month ago, I created a fork of the "Gradle" github project in order to work on some userguide fixes. I cloned the fork to my desktop and I created a branch to do my work on (I'm not sure which one of those I did first).

I'm doing most of my work in Eclipse, using the Egit plugin.

Today I decided I was done with my changes. I committed all of them, but I chose just "Commit", not "Commit and Push". I then rebased my branch to the Local "master" branch and did some testing.

I then tried to push my changes upstream, but I realized that Eclipse isn't giving me that option. The "Push to Upstream" option is now greyed out. There is a "Push Branch..." option, but I don't know what that is.

I also decided to look at my fork on Github to see if I could see something from that, and now I can't find it on Github. I'm really confused.

Update:

I guess it's pretty clear that I neglected to do the fork first, so I only cloned the main project.

So what is the least painful surgery I can perform to get to a sane state?

I imagine this will start with actually forking the project. Can I then just change the local project to point to the fork and then push to upstream?

If that's possible, note that the properties of the local project have the "remote"->"origin" section, with the following properties: * fetch: +refs/heads/:refs/remotes/origin/ * url: https://github.com/gradle/gradle.git

Would I just change the url property?


I'm not sure which one of those I did first

The more likely scenario is that you cloned your repo locally and used Egit to create a new branch (which is a great habit, kudos for doing that if you are new to git :) )

I am not familiar with EGit but it seems like it doesn't know where to push :

  • Push to upstream : push your local branch to the remote, updating the remote branch set as the upstream of your local branch.
  • Push branch : push your local branch to the remote, if there is no upstream set, create a new remote branch which will be your new upstream-branch for your local branch.

As for your last point : if it is not displayed at that URL, it means it does not exist anymore :

https://github.com/{your_name}?tab=repositories

A solution would be to just refork it and update your remote URL.

Update:

After forking the main project, you will just have to change your remote URL :

git remote set-url origin {your_fork_url}

Don't forget to rebase your work to the latest origin/master after that. You should now be able to push your branch without any issue.