Questions tagged [subtree]

172 questions
48
votes
9 answers

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

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…
Sam Deane
  • 1,553
  • 1
  • 13
  • 17
31
votes
3 answers

Boost 1.46.1, Property Tree: How to iterate through ptree receiving sub ptrees?

First of all I shall say that I think I got how it should be done but my code will not compile any way I try. I based my assumption on this official example of empty ptree trick. There you can find next line: const ptree &settings =…
Rella
  • 65,003
  • 109
  • 363
  • 636
26
votes
3 answers

How to push to git subtree?

I added a subtree on git which seems to be working. I went into the directory and made some changes and then pushed. I noticed these changes show up in the parent project but the repository which I used as the source hasn't been updated. I tried…
Philip Kirkbride
  • 21,381
  • 38
  • 125
  • 225
20
votes
2 answers

Git confused when merging an update into my subtree

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…
VoxPelli
  • 2,697
  • 1
  • 16
  • 22
18
votes
2 answers

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

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 >>>>>>>…
Jeremy Slade
  • 4,058
  • 1
  • 18
  • 14
16
votes
3 answers

Procedure for cloning Git repos that use subtree

I'm using Git's subtree command to pull a couple of libraries in to a project. If I then clone the project in the normal way, I end up with all the code that I need, but I lose the subtree relationships - in the clone there is no remote for each of…
Sam Deane
  • 1,553
  • 1
  • 13
  • 17
14
votes
2 answers

assertion failed errors when trying to git subtree split

I have a private GitHub repo (which I can't share here) cloned locally. I want to split a subfolder in this repo into a new subtree repo. I'm following these instructions Using Git subtrees for repository separation (under Splitting code into its…
Jorge Orpinel Pérez
  • 6,361
  • 1
  • 21
  • 38
14
votes
5 answers

git: can I subtree merge just a subpath of a repository?

I have the remotes Foo and Bar. Foo is a web application that has lots of directories, relevant amongst them is /public which contains assorted files and other directories. Bar is a set of libraries and whatnot used on the front end, as such, it…
kch
  • 77,385
  • 46
  • 136
  • 148
13
votes
2 answers

How do I fix a git subtree after the upstream project force pushed onto master?

I've been experimenting with using git subtree and have run into the following situation. I used git subtree to add an external project to my repo, I intentionally kept all of the history for the upstream project as I want to be able to refer to the…
csnate
  • 1,601
  • 4
  • 19
  • 31
13
votes
1 answer

Reset diff count in git subtree

Using git-subtree, the number of diffs to calculate when running a git subtree split increases over time, reaching values that can make a split take very long. One way to fix that is to git rm the path, commit it and then git subtree add it back. Is…
raphink
  • 3,625
  • 1
  • 28
  • 39
13
votes
4 answers

"Fatal: bad object" error using git subtree push

This is a noob question but I'm under the gun to resolve this. I've inherited an odd problem with a git subtree that appears to be repo corruption. Here's the scenario : a subtree of a git-based project A is being used in project B. Part of the…
Kodez Monkey
  • 171
  • 1
  • 8
13
votes
1 answer

git subtree push changes back to subtree project

The short of what's below: I want to push commit messages to a subtree, but only the messages that apply to that tree. How do I do this? I have two projects, Master and Slave. Slave is checked out as a subtree of Master checked out to lib/slave…
user578895
11
votes
1 answer

How to remove git subtree reference

I added a subtree via git subtree add --prefix=path/to/example --squash git@github.com:johndoe/example.git master and want to remove it. There's no git subtree rm command. I already deleted all files in path/to/example but path/to/example still…
ryanve
  • 50,076
  • 30
  • 102
  • 137
11
votes
2 answers

Find all subtrees in a tree matching a given subtree in Java

I am writing code in Java that uses an unordered, rooted tree where each node may have any number of child nodes. Given a tree T and a subtree S, I want to be able to find all the subtrees in T that match S (that is all the subtrees in T that are…
tree-hacker
  • 5,351
  • 9
  • 38
  • 39
9
votes
5 answers

Algorithm to detect when graph re-converges (similar to common subtree?)

I've been working on this problem all day, I'm re-writing one of our legacy products and I'm having a hard time determining how to find a specific node in my flow chart. The problem reminds me of University, but for the life of me I can't come up…
Brian Garson
  • 1,160
  • 6
  • 11
1
2 3
11 12