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

Re: Checkout of orphan branch files into mainline worktree

From
SBSanti Béjar <santi@agolina.net>
Date
Mar 25, 2010, 11:10 UTC
Message-ID
<adf1fd3d1003250410w5bd79777h77e1923e5a4b19dd@mail.gmail.com>
In-Reply-To
<hofehl$jbn$1@dough.gmane.org>

On Thu, Mar 25, 2010 at 11:39 AM, Gianluca Pacchiella <gianluca.pacchiella@ktln2.org> wrote:

Show 14 quoted lines
> Hi folks,
>
> I have a repository where I maintain a project for a web site with a branch
> (disconnected from the mainline history) that contains some files
> (necessary only for a particular instance of a site) that don't intersect
> with others files in the main project. Since I don't want to use submodule
> and subtree I manage myself to this sequence of commands ("deploy" is the
> branch name of the mainline history and "index" of the --orphan branch) to
> checkout the index's files into the mainline files
>
> git read-tree index && ( git ls-files --with-tree=index | git
> checkout-index --stdin ) && git read-tree deploy
>
> Are there some other ways to do this? I'm crazy? are there side effects?

I don´t know if this is a good idea in general, but you could get the same result with:

git merge --no-commit index && git reset deploy

HTH, Santi

Show 9 quoted lines
>
> Thanks,
>        Gianluca
>
> --
> To unsubscribe from this list: send the line "unsubscribe git" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html
>
Previous: Gianluca Pacchiella
Message 2 of 2 in “Checkout of orphan branch files into mainline worktree”
  1. Gianluca PacchiellaMar 25, 2010
  2. Santi BéjarMar 25, 2010

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.