0

I forked an open-source repo so that I could add some commits and make a pull request. After that pull request was merged GitHub was still stating, that my branch was 'x commits ahead' of main, even though it wasn't since all of these commits were merged.

Now I have a problem, where any new PR I am creating is showing all the commits that have already been merged in a prior PR unrelated to the new commits I am making to implement a new feature.

enter image description here

If you look into my fork it says that it's 10 commits ahead of main, even though it's actually only 4 commits ahead


main: https://github.com/denoland/fresh
my fork: https://github.com/michael-pfister/fresh
old pr with merged commits: https://github.com/denoland/fresh/pull/609
new pr containing past commits: https://github.com/denoland/fresh/pull/614

53N71N3L
  • 23
  • 5

1 Answers1

0

I ended up having to reset my fork and redo the new commits, really bad user experience.

https://github.com/orgs/community/discussions/22440

53N71N3L
  • 23
  • 5
  • Yes, it's annoying. But it's generally bad practice to push PR/MR content from a Fork to main. I'd recommend you for your next PR to push your changes to a new Branch, that Branch can be deleted after the PR is merged and you can update your main with your squashed changes. – Lalaluka Aug 19 '22 at 10:50