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

Re: Publishing "filtered branch repositories" - workflow / recommendations?

From
Martin Langhoff <martin.langhoff@gmail.com>
Date
Dec 5, 2013, 18:43 UTC
Message-ID
<CACPiFCKZ4c-FgY36Y8J8OJ9E=MYxrc1BNadBF2QUWm_PD8KMLw@mail.gmail.com>
In-Reply-To
<CACPiFCJPq0fqOQrJD-8CHH405Xw61ZDynqqfN+_aZb3ZBgV2VA@mail.gmail.com>

On Wed, Dec 4, 2013 at 6:01 PM, Martin Langhoff <martin.langhoff@gmail.com> wrote:

> Is there a reasonable approach to scripting this?
Found my answers.

The 'subtree' merge strategy is smart enough to "mostly" help here. However, it does not handle new files created in the subdirectory.

My workflow is this one. It is similar to the recipes for the subtree merge strategies, but invoking git mv to pull files out of the

git merge -s ours --no-commit upstream/branch git read-tree --prefix= -u upstream/branch git mv mysubdir/* ./ ### read-tree can't do this git commit

... time passes
git merge -s subtree --no-commit upstream/branch
if [ -d mysubdir ]; then
    # handle new files
    git mv mysubdir/* ./
fi
git commit
glad that I ended up reading a lot about subtree.
cheers,
m
-- 
 martin.langhoff@gmail.com
 -  ask interesting questions
 - don't get distracted with shiny stuff  - working code first
 ~ http://docs.moodle.org/en/User:Martin_Langhoff
Previous: Martin LanghoffNext: Jens Lehmann
Message 2 of 13 in “Publishing "filtered branch repositories" - workflow / recommendations?”
  1. Martin LanghoffDec 4, 2013
  2. Martin LanghoffDec 5, 2013
  3. Jens LehmannDec 5, 2013
  4. Martin LanghoffDec 5, 2013
  5. Jens LehmannDec 5, 2013
  6. Martin LanghoffDec 5, 2013
  7. Jens LehmannDec 6, 2013
  8. Martin LanghoffDec 6, 2013
  9. Heiko VoigtDec 9, 2013
  10. Junio C HamanoDec 9, 2013
  11. Jens LehmannDec 11, 2013
  12. Junio C HamanoDec 11, 2013
  13. Heiko VoigtDec 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.