Answer the question
In order to leave comments, you need to log in
What is the best workflow for working with git subtree?
Disclaimer: I immediately apologize for the importunity, but I have been at a dead end for the third day due to a purely technical question on git. This question is a logical continuation of this one .
I tried to split the repository using subtree (did based on different examples, here is one of them ). It turned out to isolate the folder with the history into a separate repository - there are no complaints here, it works perfectly and it's clear how. Taking a local copy of the folder into a local copy of the main project from the resulting repo turned out to be more difficult - I had to use these tips . Then I got to the point of having to push changes to the local repo and get updates from it - and stalled. Here is such a problem . As reasonably noted inone of the answers , nested commands do not work in windows (checked - they really do not work). With the solution proposed by the link (execute commands in turn), not everything is in order either. When I try to run the command on my repo
git subtree split --prefix <subtree-folder-path-relative-to-master-repository> master
I get a strange error message: assertation faild [changed-file-path = path-to- subtree-folder-relative-to-master-repository] and the message "No new revisions were found". However, even if it did work, it's still cumbersome. The same few commit commands are issued, which makes the subtree no more useful than the submodule, and certainly (here IMHO) less understandable in terms of the features of working with it. I think I'm doing something completely wrong
If someone has time, tell at least briefly about your workflow with subtree under Windows 7. I think it will be useful not only to me, but also to the community - only during these three days of asking questions to knowledgeable people it turned out that everyone had heard about subtree and submodule, but did not use because it is difficult.
update: There is a suspicion that the problem may be that I used non-unix-style separators in the paths. Tomorrow I'll try to check - now there is no spirit.
Answer the question
In order to leave comments, you need to log in
The problem really was in the separators. But, having dabbled with subtree, I eventually preferred submodule as a more transparent (in my opinion) mechanism. Now I am finishing work on a series of articles on Habra on the topic. From day to day I will publish - and add links to sections in the articles here.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question