Skip to content

Instantly share code, notes, and snippets.

@austinbv
Last active October 25, 2021 23:50
Show Gist options
  • Save austinbv/1c5dabb881bd0c039e738246eddd738e to your computer and use it in GitHub Desktop.
Save austinbv/1c5dabb881bd0c039e738246eddd738e to your computer and use it in GitHub Desktop.

Hey Everyone - I am seeing something really weird and I am not sure if it's my lack of understanding about Github PRs or if it's a bug.

I created a repo as an example of what's happening. https://github.com/austinbv/test-pr

The general workflow we are attempting:

  1. Developers work in a feature branch (https://github.com/austinbv/test-pr/tree/flowthrough)
  2. Developer pushes Feature branch and creates a PR from Feature branch into master (austinbv/test-pr#1)
  3. Feature branch gets merged into master (austinbv/test-pr#1)
  4. After a while, we cut a release by creating a PR from master into a prod (austinbv/test-pr#2)
  5. master is merged into prod (austinbv/test-pr#2)
  6. Rinse and repeat!

When we create merges into prod from master we always see merge conflicts, and ALL the commits that have happened on master since prod was created are applied.

You can see that here (austinbv/test-pr#5).

Things that seem off:

  1. The PR shows too many commits being merged https://github.com/austinbv/test-pr/pull/5/commits
  2. The PR Shows more changes than need to be applied https://github.com/austinbv/test-pr/pull/5/files
  3. The diff view on github shows the correct diff https://github.com/austinbv/test-pr/compare/master..prod
  4. The create PR shows the incorrect diff https://github.com/austinbv/test-pr/compare/master...prod
  5. All merges and rebases work as expected if I use git locally to do it

I did notice returning to a repo a few days later the diffs and pr's were mergable so it could be a cache issue.

Any opinions on what we are doing are welcome

@MihailGutan
Copy link

Have you been able to resolve this? Seeing the same.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment