4

Given a repo with both master and development branches, hotfixes are branched off of master and are then merged into master with a pull request (PR) on Github.

What's the best way to get hotfixes moved from master to develoment?

What we've been doing is making another PR directly from the hotfix branch to development, but then we're seeing lots of unchanged files show up in the diff of the PR. We think this is because the PR diff is not showing changed files from the HEAD of each branch, but from the last common ancestor.

To me, it seems like whatever we do should be done on Github, since that's where the PR/merge for the hotfix took place. With that in mind, I'm thinking that after merging the hotfix to master, the next step would be to do a PR/merge from master to development, but I'm not sure.

Redtopia
  • 4,947
  • 7
  • 45
  • 68
  • merging *master* instead of *fix* into *development* does not make sense because there is no reason why `git` should choose a different "last common ancestor." – Timothy Truckle Mar 22 '18 at 18:00
  • Yes, but the diff for a PR from `fix` to `development` clearly shows files that were not modified. – Redtopia Mar 22 '18 at 18:07
  • and the diff against *master* does not "show" these files? – Timothy Truckle Mar 22 '18 at 18:13
  • 1
    It also shows the same diffs, which I would expect. I'm guessing that this is because we've never merged `master` into `development`, and if we start doing this, the non-changes will stop showing up. – Redtopia Mar 22 '18 at 20:36

0 Answers0