Re: merging unmanaged working tree
From: Avery Pennarun <hidden>
Date: 2016-06-15 22:48:26
2010/3/15 Łukasz Stelmach [off-list ref]:
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