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

Django/Python Consulting

If you have a specific Django challenge or integration you'd like to solve, I'd be happy to help. Book a free 30-minute call to discuss your project, see if we're a good fit, and explore the best approach for your needs. After the call, you'll receive a tailored cost estimate based on what we discuss.