The easiest way to do this is to create a branch based on where you need to add new files, clear the index, and add new files from where they are currently located.
eg.
git checkout -b newbranch [<option starting sha1>] git rm -r --cached -- . cd /other/tree git --git-dir=/first/tree/.git add .
Once you do this, you probably want to reset the work tree to its original location.
cd /first/tree git checkout -- .
Charles Bailey Dec 15 '09 at 18:36 2009-12-15 18:36
source share