Questions tagged [subtree]
172 questions
3
votes
4 answers
Traversing a unidirectional tree efficiently
I've got a unidirectional tree of objects, in which each objects points to its parent. Given an object, I need to obtain its entire subtree of descendants, as a collection of objects. The objects are not actually in any data structure, but I can…

Yuval
- 7,987
- 12
- 40
- 54
3
votes
0 answers
git: subtree merge from subtree and pulling updates
I have two projetcs in two separate git. The second contains a partial fork of the first :
projectA/
+-- .git/
+-- plugins/
`-- project/
projectB/
+-- .git/
+-- modules/
`-- fork-project/
I managed to get that projectB using (got…

Léa Raya DÉCORNOD
- 31
- 1
3
votes
0 answers
Automatically keeping shared git subtrees in sync
On our server we have different git repos for different projects that share some components as sub-trees. It is pretty important to me that they remain sub-trees, because we do active development in the whole source base and it is important that…

Daniel Fabian
- 3,828
- 2
- 19
- 28
3
votes
2 answers
Git subtree merge removes changes in branch being merged to
I setup two repositories using the structure described in the Git book here: http://git-scm.com/book/ch6-7.html. Basically, I wanted to keep a relationship between the copy of one repo and it's master branch on origin. I know you can do this with…

alk3ovation
- 1,202
- 11
- 15
3
votes
2 answers
Installing wordpress in a subdirectory using git but without using git submodules
I'm working on a localhost to live wordpress workflow using git (based on Mark Jaquith's Wordpress Local Dev post). My file structure looks like this
local.dev
.git
index.php
.htaccess
wp-config.php
local-config.php…

kallsey
- 63
- 1
- 6
2
votes
0 answers
Create Template of Git Subtree Repository for simple reuse
Recently i had extensive use of git subtree in a project.
Works all really fine.
Now it turns out, that this project will be reused a lot of times, whenever i need this kind of project for a customer.
You can imagine something like a…

dasheddot
- 2,936
- 4
- 26
- 33
2
votes
1 answer
Finding the smallest subtree
Given a graph of n nodes that are all interconnected on a coordinate plane, what's the best way to find a subtree of minimal distance that contains m nodes?
The only solution I've found to this problem is to generate all combinations of the nodes to…

kevmo314
- 4,223
- 4
- 32
- 43
2
votes
0 answers
Find rooted sub-tree containing predefined set of values
Given a tree of nodes find a rooted sub-tree that contains a set of predefined values. The nodes in the tree are unique but their associated values may be repeated.
Ideally the most shallow sub-tree is returned. The sub-tree may also be returned…

Nick
- 339
- 1
- 11
2
votes
2 answers
Limit the initial (anchor) values of a recursive query (with statement)
Suppose we perform a recursive query to obtain the children of a certain tree node via an adjacency table of the tree, but it suffices to obtain only a single sub-tree.
As an example, let's create the adjacency table of the tree as
CREATE TABLE…

AlQuemist
- 1,110
- 3
- 12
- 22
2
votes
3 answers
git subtree push fail "/Applications/Xcode.app/Contents/Developer/usr/libexec/git-core/git-subtree"
I could git subtree pull successfully, but git subtree push fail on my mac book while it success in other Mac book.
This my command.
git subtree push --prefix=xxx ssh://xxxx/xxxx.git xxmaster
It only fail on my Mac…

Max Chan
- 21
- 2
2
votes
2 answers
What's the difference between git-worktree and git-subtree?
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…

ATL_DEV
- 9,256
- 11
- 60
- 102
2
votes
1 answer
push with git subtree to project root
I am currently working on a github pages project and generate the website to a folder named dist on a branch named dev. I want to push the content of dist to the master branch. Googling around I found github subtree and I could push the dist…

Marc
- 626
- 5
- 15
2
votes
0 answers
How to switch from a subrepo development to a new repo keeping all the history?
Here is a realistic scenario with a bit simplified main actors:
There is a repo: device here
There is a repo: ourdevice here
device is something developed by a third person.
ourdevice is my repo, which I created to work on further development of…

apaj
- 191
- 11
2
votes
3 answers
Using git for plugin development
Similar questions to this have already been asked, although they're not exactly what I'm trying to do.
At first I thought I needed a git submodule, then to set up a superproject and then a sub tree merge but I'm not sure if any of these really…

Greg K
- 10,770
- 10
- 45
- 62
2
votes
0 answers
git: working with 'parent' and 'child' repositories
In my project I want to manage 3 repositories:
PARENT
CHILD1
CHILD2
The reason I'm not using only one PARENT repository that contains CHILD1+CHILD2 is that CHILD1\2 can be used in other projects also.
In a specific stage I want to tag all 3…

Zvi Vered
- 459
- 2
- 8
- 16