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

Re: Questions/investigations on git-subtree and tags

From
JRJeremy Rosen <jeremy.rosen@openwide.fr>
Date
Mar 7, 2013, 11:05 UTC
Message-ID
<1938485067.193912.1362654351290.JavaMail.root@openwide.fr>
In-Reply-To
<CALeLG_=YQDrgMfOoR_GyNRexWxDqQGhFubmaYwM6pqXJuLnO6A@mail.gmail.com>
Show 5 quoted lines
> 
> Hi Jérémy,
> 
> Git subtree ignores tags from the remote repo.
> 
is that a design decision or a case of "not implemented yet"
> To follow a project in a subdirectory I would use git-subtree add
> selecting a branch, not a tag, from the other repo. Then use
> git-subtree pull to keep yourself updated.
> 
well... yes, but releases are marked by tags, not branches so what I really want is a tag.
I still use git so I have the possibility to update and can traceback what happened later
Show 10 quoted lines
> e.g.
> 
> To add:
> 
> git subtree add --prefix=$subdir $repo $branch
> 
> Then to update:
> 
> git subtree pull --prefix=$subdir $repo $branch
> 
ok, that probably works with branches (didn't test)
Show 9 quoted lines
> If you make any changes on the branch and wanted to push them back
> you
> could do that with:
> 
> git subtree pull --prefix=$subdir $repo2 $branch2
> 
> $repo2 and $branch2 would be different from $repo and $branch if you
> wanted to push to your own fork before submitting a pull request.
> 

shouldn't there be a subtree split somewhere ? IIUC pull is only merge from the remote to my local repo, not the other way round

> --
> Paul [W] Campbell
> 
Previous: Paul CampbellNext: Paul Campbell
Message 3 of 14 in “Questions/investigations on git-subtree and tags”
  1. Jeremy RosenMar 7, 2013
  2. Paul CampbellMar 7, 2013
  3. Jeremy RosenMar 7, 2013
  4. Paul CampbellMar 7, 2013
  5. Jeremy RosenMar 7, 2013
  6. Paul CampbellMar 7, 2013
  7. Jeremy RosenMar 7, 2013
  8. Paul CampbellMar 7, 2013
  9. Jeremy RosenMar 7, 2013
  10. Jeremy RosenMar 8, 2013
  11. Junio C HamanoMar 8, 2013
  12. Jeremy RosenMar 8, 2013
  13. Jeremy RosenMar 12, 2013
  14. Paul CampbellMar 12, 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.