Yes I know that that what I want (git cp a b) approximately equal to
cp -R a b
git add b
However this adds files that aren’t in the repository. The closest I have gotten is
cd a
git ls-files > ../files.txt
cd ../b
cat ../files.txt | xargs git add
almost works, but there are problems with files with whitespace in the name. I’m using Cygwin for what it’s worth
You need to separate the file list by a character that cannot occur in file names, i.e., the null character. Try: