git-subtree

Git Subtree Merging reports conflict when merging a simple upstream change

点点圈 提交于 2019-12-01 05:29:39
问题 I'm getting started with learning subtree merging in git 1.8.2. I have created a simple example to test a change to a third party repo migrating into a main project. I'm following the 6.7 Git Tools - Subtree Merging example. The 'sub' project is included as a subdirectory in the 'main' project. After I make a change to the 'sub' project, git reports a conflict when I try to merge the change into the 'main' project. Test Summary Created repos for projects 'main' and 'sub' (sub instead of rack)

Git subtree split two directories

痴心易碎 提交于 2019-11-30 16:58:36
问题 I've been following this excellent answer to extract a subdirectory of my git repository into its own repository, while retaining the complete history. My repository looks like: src/ http/ math/ tests/ http/ math/ I want to create a new branch that only contains the src/math and tests/math directories. If I run the following command: git subtree split -P src/math -b math It creates a branch that contains the contents of the src/math directory, but discards the src/math/ prefix. If I try the

How to structure a python projects with shared sub apps using git and buidout without symbolic links

青春壹個敷衍的年華 提交于 2019-11-30 15:31:30
I have multiple projects that shares child apps with other projects . When working within the project directory I want to be able to make changes to the app , update it, and pull those updates into the second project . Requirement: No use of symbolic links (my IDE's debugger doesn't work well with them) No compiling/rerun a script. I would like to make changes to the app without having to rerun a script/buildout. Apps must be within the project folder. Here's the structure: app_one (git repo) |-- app_one (actual app uses by projects) | +-- models.py |-- README.md +-- setup.py project_one (git

git subtree error “fatal: refusing to merge unrelated histories”

喜你入骨 提交于 2019-11-30 14:04:29
问题 I'm trying to figure out how 'git subtree' works. I've followed all directions on this page, but I always get an error trying to merge the subtree project in my own repo ('Step 2'): fatal: refusing to merge unrelated histories . I've read this post, and when I use the --allow-unrelated-histories option, it seems to work fine. However, I'm not sure whether I should use this...My impression is that the whole point of subtrees is to have unrelated histories within one repository, so it feels

Is git svn compatible with git subtree?

时间秒杀一切 提交于 2019-11-30 13:11:46
Now that git subtree has been merged into the core git distribution (its also on Msysgit as of 1.8.0), does anyone know if git svn works with git subtree? Note: I am not talking about the subtree merge strategy, but about this . Git submodules cannot be used directly when you are using git svn . Instead, it requires another level of indirection . In addition, the git subtree workflow is more convenient when you're tracking third party respositories , which is something that happens when you use svn too. My question is, how do I find out if git subtree has any issues when used with git svn? I

GIT Nested repositories: Composer vs. SubModules vs. Subtree vs.?

对着背影说爱祢 提交于 2019-11-30 11:56:37
问题 I've finally incorporated GitHub and Composer dependency management on my workflow. It's definitely a huge step forward, although I remain very confused about GIT managing the "nested" dependecies. As I'm using an awesome Wordpress Stack ROOTS/BEDROCK, my simplified directory structure looks like this: |-- /project | |-- /.git // git repository for the skeleton/stack of the project | |-- composer.json // list of dependencies, most of them are my own repositories on GitHub | |-- /vendor | | |-

git subtree error “fatal: refusing to merge unrelated histories”

本秂侑毒 提交于 2019-11-30 09:15:24
I'm trying to figure out how 'git subtree' works. I've followed all directions on this page , but I always get an error trying to merge the subtree project in my own repo ('Step 2'): fatal: refusing to merge unrelated histories . I've read this post , and when I use the --allow-unrelated-histories option, it seems to work fine. However, I'm not sure whether I should use this...My impression is that the whole point of subtrees is to have unrelated histories within one repository, so it feels strange to have to add the option. Should I add it nevertheless, or am I doing something wrong? I'm

Adding git subtree from a branch

情到浓时终转凉″ 提交于 2019-11-30 08:39:21
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 ca26d248a12c21264e32a2c212381cafb578c9fb 'ca26d248a12c21264e32a2c212381cafb578c9fb' does not refer to a

What is the difference between git subtree merge and git-subtree

邮差的信 提交于 2019-11-30 05:02:18
I've just found git-subtree tool that some time ago became a part of main git repo https://github.com/apenwarr/git-subtree/ However I don't fully understand what functionality does this tool provide over the already existing "git read-tree" + "git merge -s subtree". Is the only purpouse of git-subtree - making the resultant commit history look better or does it have more functionality that I've overlooked? The commands you describe reads a subtree into a repository. The git-subtree command has many more options, as described by the documentation. Among others, you can (annotated for simplicity

Best practices for using Git with Magento?

Deadly 提交于 2019-11-30 02:23:20
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 * /lib /Zend /Varien /yourlib * /js /yourjs * /varien /mage Using git submodule seems to work best in