Including Third Party repo's in git

I have checked out a number of repo's and made a number of local fixes on my own branches.

I now want to add these repo's to my main project as I need to keep the changes but also potentially have the history associated with the third party repo's so that I can see what changes I've made.

This relies upon a branch being created in each third party repo so that you know exactly what you are using.

This is not subtree or submodules. It is a kind of hybrid sub-tree with each third party history in a separate branch. Note: only the single branch history is included.

I've not tested pulling/pushing from the third party repo's. At the moment all I want is to be able to see what my fixes are and what exactly is being used.

Note: gitkraken does not like the branches created.

Problems: git submodules in the imported directories are not setup. You have to manually find and fix.

References:
  • https://stackoverflow.com/questions/37775092/how-to-use-git-subtree-to-add-local-repo
  • User dmg
  # add remote
  git remote add sub 
  # fetch commits
  git fetch
  # create local branch with sub
  git checkout -b sub_branch sub/master
  # switch to master
  git checkout master
  # now, merge commit as a subdirectory
  git read-tree --prefix=sub/ -u sub_branch

This is what I actually did:
git checkout master
git remote add osgqt /home/damian/merge_test/ThirdParty_01/osgQt/.git
git fetch osgqt
git checkout -b ThirdParty/osgQt osgqt/dd_branch
git checkout master
git read-tree --prefix=src/ThirdParty/osgQt/ -u ThirdParty/osgQt
git commit
git push
git checkout ThirdParty/osgQt
git push origin HEAD:ThirdParty/osgQt

 So after the above I see the following (in gitkraken):

Comments