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

Re: merging unmanaged working tree

From
ŁSŁukasz Stelmach <lukasz.stelmach@iem.pw.edu.pl>
Date
Mar 15, 2010, 15:19 UTC
Message-ID
<87d3z5k3yb.fsf@dasa3.iem.pw.edu.pl>
In-Reply-To
<46a29168.6d880e7c.4b9e296c.483a1@o2.pl>
Daniel <mjucde@o2.pl> writes:
Show 11 quoted lines
>> Is there a method to (dry?) run git-merge to detect conflicts
>> on:
>> 
>> * current HEAD (or working tree)
>> * selected previous revision (the one used to "branch")
>> * directory tree (or a single file) "branched" with git-archive
>> 
>> I'd like to synchronize portable working tree but don't want to keep
>> history in it.
> Does "git-merge --squash" do what you want? You still need to have
> the other tree managed by git (even for a while).
Not really. Well, what I want is abit odd so let me try another way
1. There is a repository (non-bare one) with all changes
   commited. Commit A.
2. I take some files put them on my pendrive. I take a note that they come
   from commit A. I don't clone the repository.
3. I make changes here (in the repository) and commit them (commits B,
   C, D) and there (on my pendrive).
4. I want to merge things with something like this
$ git diff3 file1.c(D) file1.c(A) /media/project/file1.c
* file1.c(D) is the lates version in my repository and working tree
* file1.c(A) is the point where I branched
* /media/project/file1.c is the unmanaged version of the file with changes
  I made on the go.

Does git allow to retrieve (to stdout) a particular revision of a single file? If so I could use "<(git retrieve A file1.c)" bash trick.

Or (this is my goal) is there another way not to keep the whole history of my repository on the pendrive? Just the changes I made since the brnaching point. And then clean (yeah squash, but it's not the same I am afraid) everything after merging.

-- 
Miłego dnia,
Łukasz Stelmach
Previous: DanielNext: Avery Pennarun
Message 3 of 9 in “merging unmanaged working tree”
  1. Łukasz StelmachMar 15, 2010
  2. DanielMar 15, 2010
  3. Łukasz StelmachMar 15, 2010
  4. Avery PennarunMar 15, 2010
  5. Łukasz StelmachMar 15, 2010
  6. Avery PennarunMar 15, 2010
  7. Chris PackhamMar 15, 2010
  8. Avery PennarunMar 15, 2010
  9. Łukasz StelmachMar 15, 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.