About Merging Branches, but Ignoring the Changes in One of Them

You have two diverged Git branches with changes in both of them, and need to mark them as merged but ignore the changes in one of them. For example, you have the primary branch with an outdated Django version, and upgrade branch with the new Django version. These are the steps to take:

  1. Checkout the upgrade branch.
  2. Merge primary to upgrade without committing.
  3. Reset all modified files.
  4. Commit the merging to the upgrade branch.
  5. Checkout the primary branch.
  6. Merge the upgrade branch to primary branch (fast forward).

Tips and Tricks Development Upgrading Git