How can I sync files in two different git repositories (not clones) and maintain history? -
I keep two separate git repos that need to share some files, and I want to To be shown in a repo in another. What is a good way to do this for ongoing maintenance in each repo?
I'm one of its controllers, and recently I fell in the role of maintaining Pearl's core documentation, whatever Git.
Before I maintain perlfaq, it used to remain in a separate source control repository. I recently changed the GIT. From time to time, one of the perl5-porters will sync shared files in perlfaq repo and Pearl repo. Since we have switched to git, we are a bit lazy to change tools, and now I am what it does. For the time being, two repos are going to be different.
Currently, to sync a frequently asked question for a new (monthly) release of Pearl, I'm ashamed to say that I only perlfaq * .pod Files perlfaq repo and overlay them in Pearl repo loses this history, etc. In addition, sometimes someone changes the Perl repo in those files and I overwrite it (yes, check git diff
stupid!). The repository does not have the same path in the files, but there is something I can change, I think.
What do I want to do, in the magical universe of the rainbow and pony, pull objects from Perlfaq repo and apply them in perl repo, and vice versa, hence the history and committed are related in each ID.
- The construction of the patch works, but it is a lot of work to manage.
- The GET subdomain works only to pull in the entire external repo
- I have not found anything like SVN file extant, but it will work in both directions anyway
- I just want to bring things from one and take the cherries in the other.
What is a good way to manage it?
Subdivision merge strategy combined with the script, can help here.
It will work to push and pull.
This is still something, though Git1.7.0 will be fixed with the ' -Xsubtree
option, but it's still worth looking into it.
Comments
Post a Comment