1

I'm working on an open source project on GitHub and I have some issues. My origin/branch is up to date with the project and when I make pull requests from it, it compares with the good branch of the project. That part works wonders. Where it gets confusing is here: I have created numerous branches from the same point where I started working on my remote origin project. Then I made some changes and wanted to make a pull request.

The thing is: the new branches I created are too old to be compared with the project, GitHub tells me there's over 250 commits in the pull request I'm making. What I don't understand, since the branches (5) that I created come from the same point in time like the remote origin/branch that I'm working on, why are my branches too old ?

I'm working with someone who would like(and I concur) create pull requests for only a single feature. The idea behind the my many branches was to have the feedback as quickly as possible instead of opening one and waiting.

I tried updating my forked project using this : How to update GitHub forked repository? but I haven't yet found the proper solution for my branches and how to make sure this situation does not happen to me in the future.

  • Did you look what were those 250 excessive commits? `git log --not ` should list those. `git log --decorate=short --oneline --graph ` might be handy for the history visualization. – Mykola Gurov Jun 25 '15 at 06:06

1 Answers1

1

You will need rebase forked copy. This happens when your fork is out of sync with remote upstream. Following helped me.

  • git checkout master
  • git fetch upstream
  • git checkout
  • git rebase master
  • git log master (check if commits from remote master are appearing)
  • git push -u origin -f (You need to do force push)
localhost
  • 228
  • 1
  • 11
  • Will this bring all the branches all synced? Those the op created and those he will create ? – Kevin Avignon Jun 26 '15 at 00:41
  • No it will just sync his current branch with upstream/master. If he is want to sync multiple branch then I think he will need to do same in every branch. Even I am looking for possible solution to sync all branch. But above solution works fine for me. – localhost Jun 26 '15 at 14:52