We have a private Git repo with our project and we currently have another well-known repo in a subfolder there - as a subrepo (using https://github.com/ingydotnet/git-subrepo). When a new release of the well-known repo becomes available, we would like to have it in our repo. However, we have made some changes relevant to us in the subfolder. We don't want to commit our changes to the well-known repo, but we also don't want to lose them - we want to merge them with the new release.
Currently with "git surepo" I don't see a non-manual way to do it. There is no proper way to upgrade the subrepo to a release - one can pull the master without branches or tags, but for pulling a tag the only option is to do it from scratch, so the subrepo directory has to be deleted, which, obviously, erases all our changes.
We have looked at other alternatives to subrepo, but they don't seem to make life much better if they work in this case at all. Some of them are:
- manually adding changes is the very last resort
- have a separate repository (due to specifics of this project we are trying to avoid it, and it's obviously harder to maintain)
- git submodule doesn't make it much better and adds other problems
- git fork is possible, but involves a lot of work to get there and is pretty complex
I hope I have made the question clear. Any ideas here, please?