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

Re: merging unmanaged working tree

From
Avery Pennarun <apenwarr@gmail.com>
Date
Mar 15, 2010, 19:22 UTC
Message-ID
<32541b131003151222r32244cf4o6182545e3a1eb1aa@mail.gmail.com>
In-Reply-To
<87d3z5k3yb.fsf@dasa3.iem.pw.edu.pl>
2010/3/15 Łukasz Stelmach <lukasz.stelmach@iem.pw.edu.pl>:
Show 10 quoted lines
> 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
You have a few options that I can think of.

a) Look at 'git clone --depth' so you can clone only the most recent version of the files, not the *entire* repo. This lets you do commits on any computer you want with the pen drive plugged in, but saves space.

b) Keep your .git directory on your main PC's disk, and the working tree on your pen drive. Look at the GIT_DIR environment variable in 'man git'. Then when you bring the pen drive back to your PC, you have the full repo available. (If you use 'git clone --reference' when making the new repo, the extra .git directory should take only minimal space.)

c) Make a clone of your repo on the PC, then rsync the non-git parts of that clone's work tree to and from your pen drive. (This option is the most error-prone since you have to make sure you never rsync in the wrong direction at the wrong time. But it's maybe the easiest to understand.)

Hope this helps.
Have fun,
Avery
Previous: Łukasz StelmachNext: Łukasz Stelmach
Message 4 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.