git-subtree

How to push tags with git subtree?

孤人 提交于 2019-11-29 22:31:47
问题 I have successfully created a big repo made of a few subrepos with git-subtree, let's say Master contains Slave1 and Slave2. Master/ Slave1/ Slave2/ Now I want to tag on Master and push each tag to the slave repos, how can I do it? If I "git push Slave2 --tags" the entire tag is transferred, but I only want the files related to Slave2 to be transferred. You can achieve it with git-subsplit, but it's honestly a bit unpractical and slow. Any suggestion? 回答1: As mentioned in "How to make “git

git: How to split off library from project? filter-branch, subtree?

让人想犯罪 __ 提交于 2019-11-29 22:22:19
So, I've a bigger (closed source) project, and in the context of this project created a library which could also be useful elsewhere, I think. I now want to split off the library in its own project, which could go as open source on github or similar. Of course, the library (and its history there) should contain no traces of our project. git-subtree seems like a solution here, but it does not completely fit. My directory layout is something like this (since it is a Java project): fencing-game (git workdir) src de fencing_game transport (my library) protocol (part of the library) fencing (part

Git Subtree only one file or directory

天涯浪子 提交于 2019-11-29 21:36:45
I use Git Subtree like below: git subtree add --prefix=directory_destination_path --squash git@bitbucket.org:kicaj/projectname.git master But in path: directory_destination_path copy all repo from projectname.git How to copy to directory_destination_path only subdirectory or only some file from projectname.git ? EDIT: One more question: How to update (automatic) files changes in both repositories were still the same? It is possible? eddiemoya If I understand, you seem to want to only merge in a certain directory of a different repository, and you want it to be a subtree in your repository. I

Add subdirectory of remote repo with git-subtree

≡放荡痞女 提交于 2019-11-29 20:36:09
Is there a way to add a subdirectory of a remote repository into a subdirectory of my repository with git-subtree? Suppose I have this main repository: / dir1 dir2 And this library repository: / libdir some-file some-file-to-be-ignored I want to import library /libdir into main /dir1 so that it looks like this: / dir1 some-file dir2 Using git-subtree, I can specify to import into dir1 with the --prefix argument, but can I also specify to only take the contents of a specific directory in the subtree? The reason for using git-subtree is that I can later synchronize the two repositories. John

Adding git subtree from a branch

◇◆丶佛笑我妖孽 提交于 2019-11-29 11:39:03
问题 I'm trying to add a repo (called cow) to my project using git subtree add . In particular, I'd like to add the branch stable (which is not the master branch). I tried: git subtree add -P cow https://github.com/geoffryan/cow.git stable But this returned the error 'stable' does not refer to a commit. I also tried: git subtree add -P cow https://github.com/geoffryan/cow.git cow/stable 'cow/stable' does not refer to a commit. And: git subtree add -P cow https://github.com/geoffryan/cow.git

Git using subtree or submodule to manage external resources

寵の児 提交于 2019-11-29 05:57:28
问题 I read much about how awful the git submodule is supposed to be, but I am not sure if that is just the groaning of people who feel it limits or if it has serious issues (especially concerning my use case). I just want to include different repos into my repo like this website/ libs/ js/ fs-slides [external] fs-dialog [external] and have to possibility to update those repos easily. As far as I understand there is no easy possibility of including just one file from a repo, right? (But that's

git-subtree without squash: view log

99封情书 提交于 2019-11-29 03:42:32
I merged a tree onto a my repository by using git subtree add without the squash option. A git log shows that the commits were successfully added to the repository. However, if I do a git log --follow filename , the history stops at the merge and does not show previous commits. I tried using -M instead of --follow and that doesn't work either. How can I get a log of the commits for a specific file or files from before the merge? Actually, git log --follow should work with subtree merges, but it is known to be hackish for a long time [1-3]. One can stick with subtree merges and rest asured that

Best practices for using Git with Magento?

别等时光非礼了梦想. 提交于 2019-11-28 22:44:48
问题 I'm working at figuring out how to best work within my own repo for custom code while integrating with a vendor's library (in this case Magento). In my case, I will not need to push up patches to the vendor (although that would be a great side benefit). I've looked into git submodule and git subtree. I don't think git submodule will work for what I need. Magento has the following type of tree structure: /app /code /community * /core /local * /design /adminhtml /frontend /base /yourtheme *

git-subtree pull complications

梦想与她 提交于 2019-11-28 21:21:26
We have been trying to get git-subtree working on a project (with git version 1.7.9.4) and have run into a bit of a complication. Someone else previous added the subtree with this command some months ago: git subtree add --prefix=foo git@example.com:foo.git master Now there have been substantive changes to foo and we'd like to merge in those changes, ideally squashing them in. None of the files have been modified since they were imported. I've tried three things to try and merge in the changes. First: git subtree pull --squash -P foo git@example.com:foo.git master Which throws the exception:

Managing 3rd party sources and binaries used by code under source control

会有一股神秘感。 提交于 2019-11-28 18:39:16
I have a large code base under source control (was subversion, now git). To compile the code and run the tests I use a set of 3rd party libraries. These libraries can be divided into few categoriesL Binaries only 3rd party sources 3rd party sources + local modifications Each library has its {Windows, Linux} X {debug, release} X {32bit, 64bit} configurations. In addition these libraries evolve with time and different versions of my project use different versions/builds of these libraries. My question is what is the best way to store these 3rd parties? Here is my set of preferences: Keep the