git/list[1] front-page[2] threads[3] people[4] search[5] about
 

Re: git subtree oddity

From
TTThomas Taranowski <tom@baringforge.com>
Date
Mar 28, 2013, 19:29 UTC
Message-ID
<CAH0ocazrojrJPdDDmLyL3RQaxxGjPnmhxq+FzSE0P9Y3Y05C1Q@mail.gmail.com>
In-Reply-To
<1827202810.1012362.1364488493363.JavaMail.root@openwide.fr>

I agree that subtree solves some specific use cases I would like to support. In particular, I was hoping to use the subtree command in lieu of using the subtree merge strategy to manage and overlay changes to upstream projects, as well as other local components.

At any rate, it looks like the problem I'm having is not entirely related to the subtree command, but happens when I checkout a remote into a branch ( which subtree is presumably doing in the background).

It's the same setup as before.  Here is the sequence of commands I'm running.

git init git remote add upstream git://gnuradio.org/gnuradio fetch upstream git checkout -b upstream_tracking upstream/master

Now, at this point, I expect the upstream branch to contain the contents of the gnuradio project. I also expect that my local mater branch has only the contents of my local sources, and NOT the contents of the gnuradio. However, if I 'git checkout master', I see the contents of the gnuradio project. Why, when I checkout a branch tracking upstream/master, do the changes also appear on my master branch, and not just in the remote tracking branch?

As a reference, this is close to what I'm trying to accomplish. His screenshot titled 'Directory Listing in Master' shows what I expect. http://typecastexception.com/post/2013/03/16/Managing-Nested-Libraries-Using-the-GIT-Subtree-Merge-Workflow.aspx

Thanks -Tom Taranowski

On Thu, Mar 28, 2013 at 9:34 AM, Jeremy Rosen <jeremy.rosen@openwide.fr> wrote:
Show 19 quoted lines
>>
>> I am starting to regret that I caved in and started carrying a copy
>> of it in contrib/.  It probably is a good idea to drop it from my
>> tree and let it mature and eventually flourish outside.
>>
>
> that's a shame... it solves a real problem, is simple to use, and really powerfull.
>
> but unfortunately, I have sent a patch that solves a serious bug... which had already been reported and patched but had received no answer, and nobody replied to it.
>
> Is there anything that can be done to get this rolling, or a way to have the use-case it covers better handle by git-submodule ?
>
>
> currently the problem of a git repo in a git repo is very complicated to deal with in a clean way...
>
>
> Regards
>
> Jérémy
Previous: Jeremy RosenNext: Thomas Taranowski
Message 5 of 7 in “git subtree oddity”
  1. Thomas TaranowskiMar 28, 2013
  2. Stephen SmithMar 28, 2013
  3. Junio C HamanoMar 28, 2013
  4. Jeremy RosenMar 28, 2013
  5. Thomas TaranowskiMar 28, 2013
  6. Thomas TaranowskiMar 28, 2013
  7. Junio C HamanoMar 29, 2013

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.