subtree

What's the difference between git-worktree and git-subtree?

半世苍凉 提交于 2020-01-25 04:19:05
问题 Just when I thought Git couldn't get any more complicated, I just discovered git worktree. Either this is a synonym for subtree or feature I never knew about. Is worktree the same as subtree or are they different. If they are different, how are they different and what problem does worktree solve? 回答1: These are very different. To understand them properly, let's define work-tree (or "work tree" or "working tree" or pretty much any variant of these spellings), with respect to the index and to

git checkout remote branch shows extraneous files?

前提是你 提交于 2020-01-14 04:20:28
问题 master branch has these files and folders (simplified): C:\Local\TickZoom\Project>ls file.txt name.txt public public branch is tracking a vendor repository and has been subtree merged as public folder in master branch above. public has three folders only (simplified): C:\Local\TickZoom\Project>ls platform providers www When switching from public to master it behaves correctly. However, when switching from master to public, an odd thing happens. It has all the files and folders of both

git reports merge conflict with no changes, empty lines (using git-subtree)

有些话、适合烂在心里 提交于 2020-01-01 07:45:34
问题 I'm testing the use of git-subtree to merge a library repo into a bigger project. It seems great in principle. Sometimes when I do a "git subtree pull" I get merge conflicts like this: <<<<<<< HEAD ======= An inserted line from the lib repo >>>>>>> 4d348903449ebb584ab224cb34c6038fbf6b352d That's for a change that was made in the library repo, merging into a file that has not been modified locally. Or another example, where I added a line in the local project repo, but in a file that is part

git subtree pull says that the working tree has modifications, but git status says it doesn't. What gives?

强颜欢笑 提交于 2019-12-30 05:33:04
问题 If I do this in one of my repositories: git subtree pull --prefix=frameworks/AquaticPrime --squash AquaticPrime I get this: Working tree has modifications. Cannot add. If I do this (in the same place, of course): git status I get this: # On branch master nothing to commit (working directory clean) I'm not quite sure what's going on here. The git status command implies that I don't have modifications, so I'm assuming that the git subtree pull is referring to modifications in a different branch

Git confused when merging an update into my subtree

心已入冬 提交于 2019-12-28 11:46:48
问题 We previously used many submodules in our main repositories, but to increase the maintainability of our projects we started an experimental branch where we replaced them all with subtrees. This worked good - but now when I'm trying to update one of the subtrees it erroneously merges the update into a completely wrong directory that isn't even a subtree. The main repository, where the branch "subtree" contains the experimental branch, is: git://github.com/hugowetterberg/goodold_drupal.git The

antlr3 remove treenode with subtree

怎甘沉沦 提交于 2019-12-24 07:47:28
问题 i try to do some tree to tree transform with antlr3.4 It's (for this question) about boolean expressions were "AND" and "OR" are allowed to bind to n expressions. The parser stage creates something like this (OR (AND (expr1) (expr2) (expr3) (OR (AND (expr4)) (AND (expr5)) (AND (expr6)) ) ) ) Unfortunately there are AST nodes for "AND" and "OR" that bind just to one expression. (Which is useless, but hey - rules andExpr and orExpr are invoked) I tried to kick them out (mean, replace them by

Sub-directory into independent repository and later merge back into main repository

戏子无情 提交于 2019-12-22 09:56:17
问题 I want to create independent repository out of a sub-directory of an existing git repository and later be capable to merge it back to main repository. Basically I want to separate one sub-directory of a monolithic git repository for specific work and be able to merge commits back into monolithic repo. What I did try was split a subtree: % git subtree split -P project_a/directory_a -b directory_a_branch Then I could clone directory_a_branch into separate repository and start working on it: %

Using git subtree merging, while also merging in all branches of all merged subtrees

拟墨画扇 提交于 2019-12-22 04:16:09
问题 I'd like to use a popular, open source issue tracker (Redmine) that offers git integration. Unfortunately, each project in the tracker can only be associated with one git repo. Creating multiple projects in the tracker is not my ideal setup. With that in mind, I've attempted to use git subtree merging (explained here, and here). I've created an "umbrella" repo which has merged in each of the numerous other repos that I'm working with. Unfortunately, the examples given only pull in the master

How to copy subtree from Boost.PropertyTree

耗尽温柔 提交于 2019-12-20 07:17:45
问题 I have some boost::property_tree::ptree . I need tree with removing some elements with certain tag name. For example, xml for source ptree is the following: <?xml version="1.0" encoding="utf-8"?> <document> <B atr="one" atr1="something"> <to_remove attr="two">10</to_remove> </B> <to_remove> <C>value</C> <D>other value</D> </to_remove> <E>nothing</E> </document> And I'd like to get ptree with xml like the following: <?xml version="1.0" encoding="utf-8"?> <document> <B atr="one" atr1="something

Git subtree merge strategy, possible without merging history?

一世执手 提交于 2019-12-09 04:56:56
问题 I've been trying to move away from submodules in order to get a self-contained repository, and the subtree merge strategy seems to match this use-case. However the merged repos' histories appear in my own project's history, which is reather annoying. I've tried git filter-branch --subdirectory-filter path/to/subtree/ HEAD which works... until I try to update a subtree with git pull -s subtree my-subtree master which rewrites all the subtree's files to my project's root. Is there a way to