![]() ![]() I understand the benefits of git over svn however lack of proper submodule support and lack of good large file support is probably going to make us switch to svn from git (unless we get a solution here - I'd rather stay with git). In svn, the same thing is accomplished by cd ~/dev ![]() Here are the steps to make and push a change to any module: cd ~/dev/projĪnd this has to be repeated for each module under ~/dev. It seems like git submodule is designed for modules that don't change much. We tried 'git submodule' and it is not satisfactory. It's very easy to understand, has zero impact on the individual repos, and is great for branch-switching (which is not yet supported in git-subtrees). Basically, it applies your gits commands as git commands to all your repos. Personally, I like git-slave, which is a simple wrapper around git. The author has included a script to show how its behavior compares with git-submodules and braid (which is for vending submodules, but not merging them). If you don't mind the extra 'update' step of git-submodules, but you're upset about how it handles conflicts, you could try giternal. ![]() Here is a more recent write-up, with excellent advice. You can see from the pictures that its timelines can look confusing, but functionally it's exactly what you want. Here is a nice description of its operation. It's called git-subtrees, and it is part of git-1.7.11. There is another system, built on top of the subtree-merge strategy. When you need to merge instead of just copy, there is the git subtree merge strategy. ![]() When you are ready to distribute a sub-directory as a library, you decide exactly what version of that library you want, and you copy it over to its own repo. You develop your large project as normal, with branches, merges, etc. The beauty is that you've made a sharp distinction between development and distribution. You could move code between them using rsync. One idea is to have one project repo, where you do most of your development, plus several separate repos, from which you distribute modules: proj/.git So you need a more sophisticated solution. But you actually want a combination of single repo and multiple repos, right? You want the benefits of each. The alternative for you is not Subversion, but simply a single repository, which could be in Git, Subversion, or whatever. That seems fine for awhile, but I've heard nasty war stories. It solves a different problem.) The huge drawback is that you cannot recover an exact contour of your codebase. (Google's Repo tool a wrapper around Git, meant for use with Gerrit, a code-review tool, is sort of similar. That can be useful for coordinated development. There is a big difference though: Most devs, at least during some phase of development, prefer to attach to a branch of each submodule, which is not supported by git-submodules. To commit with svn-submodules, you have to commit in each submodule directory separately, just as with git-submodules. In fact, when you use the -r to attach an svn submodule at a specific revision, the behavior is nearly identical. git-submodules is similar to svn:externals, aka svn-submodules. You could argue that we should have put proj, ext and qa under the same git repository but I thought that would have been against the git philosophy of keeping different concepts in different repositories.ĭoes anyone have a solution (other than writing a script to do git pull on every dir under ~/dev) to this trivial problem? I looked into 'git submodules' and it doesn't provide a single point for 'git pull' to update these three separate modules at the same time. This is not nice someone will always forget to update (git pull) one of these dirs and his project will be out of sync (e.g. With git, we need to do 'git pull' separately for each dir. Under svn, synchronization of these dirs was simple: a single update under ~/dev would update all of them recursively. Proj, ext and qa are different git repositories. Here is what every developers' directory structure looks like: ~/dev/proj I am working on a project where we manage external libs/headers and qa with git. ![]()
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |