I'm comparing dev branch in my fork with the dev branch in the upstream. It shows diff of 30 commits, but 0 files changes. All the commits appear in the diff are old commits which already merged to the upstream (mainly type of "Merge branch dev.."). This makes an issue where each PR shows those many old commits. Tried rebase and still showing the same diff.
Why this happens? Can you please assist how to resolve? We're using Github for Enterprise so can't attach a url that show the diffs.
Why this happens?
Possibly because you might have done PR (Pull Requests) from yourFork(origin)/dev and upstream/dev, which is not a good practice.
You would normally do a PR from a dedicated branch (myfix
) to upstream/dev
. And then simply reset your own dev
to upstream/dev
, in order to have in your fork an exact image of upstream/dev
, and:
fix
/feature
branches for future PRs,fix
/feature
branches on top of dev
in order to facilitate future PRs.If everything is committed or stashed locally, I would:
myfix
or myfeature
) right where my local dev
is (assuming I was developing the next PR directly on dev
)That is:
git switch dev
git branch myfix
git fetch upstream
git reset --hard upstream/dev
git push --force
git switch myfix
# resume working
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With