0

I've created a pull request from my fork's main branch into the upstream (i.e original repository).

Changes were merged, no problems.

After this, they made some changes, so I synced my fork, again this seems fine (I fetched the upstream and then merged with local branch).

Now I did new local changes and a single new commit but the Github repository is showing me I'm several commits ahead.

I believe this is because they collapsed my commits into a single commit, or that seems from the history of commits. There is just one commit at my user name but edited.

Now, Why is it that I am not just one commit ahead? How can I fix this such that only the difference is in the Create Pull Request?

Edit

I've read in this post the solution should be:

git fetch upstream
git checkout test
git rebase upstream/master
# not executed yet
# git push --force-with-lease

But rebase throws merging conflict errors for each commit I've made, so I am forced to fix them one by one. This does not look fine. But I am confused about how to proceed.

Output after rebasing and fixing merging conflicts, running git rebase --continue

git rebase --continue
Applying: <commit description>
No changes - did you forget to use 'git add'?
If there is nothing left to stage, chances are that something else
already introduced the same changes; you might want to skip this patch.
Resolve all conflicts manually, mark them as resolved with
"git add/rm <conflicted_files>", then run "git rebase --continue".
You can instead skip this commit: run "git rebase --skip".
To abort and get back to the state before "git rebase", run "git rebase --abort".
Minsky
  • 1,991
  • 5
  • 16

0 Answers0