Skip to content
This repository has been archived by the owner on May 10, 2024. It is now read-only.

Merging Urho and ThirdParty Updates

Rokas Kupstys edited this page Jul 6, 2017 · 2 revisions

Urho Project and ThirdParty merge instructions

Here is some Git-fu for easier merging from the Urho Project and ThirdParty updates. This was originally worked out in PR 1586.


We can merge changes from upstream repository that does not share common history with engine repository. Git will automatically take care of our changes and only add new changes from remote repository since last merge point. Git takes care of renamed directories and files too.

How to merge from upstream Urho3D repository follow these steps:

  1. Add new git remote pointing to Urho3D repository, lets call it upstream.
  2. Fetch upstream/master.
  3. Check out any atomic branch. ⚠️ Do not check out Urho3D branches ⚠️
  4. Find last commit when merge with upstream happened. At the time of writing it is commit 604d15326870598f71154ed546b73ccfc190ab19. Take note of commit message saying "Merge with upstream 5475c482989eb60b7ef92d7c2ae80ec78eba7fc2".
  5. Add a git graft point which fakes a parent for commit in our repository. Parent commit ID is last merged commit from Urho3D repository. git replace --graft 604d15326870598f71154ed546b73ccfc190ab19 5475c482989eb60b7ef92d7c2ae80ec78eba7fc2.
  6. Merge from upstream/master, git merge --squash upstream/master.
  7. Solve conflicts and commit. Do not forget to add upstream commit id to commit message.

Tips:

  • git config merge.renameLimit 1000000 sets rename detection limit high as atomic repository exceeds default limit. Do it once per repository, new checked out repositories need that set manually. If you forget it - no big deal as you will get error reminding of it.
  • If some files are incorrectly deleted as removed/added instead of renamed consider trying git merge -X rename-threshold=25 --squash upstream/master. This sets rename threshold limit to 25%. Default is 10%. Play with the number until you get satisfactory results.
Clone this wiki locally