I would use xargs -I instead since -i is deprecated. I would also copy using the --parents option to prevent overwriting files with the same name. To be on the safe side, I would add {} after xargs -I or it could result in "{}: No such file or directory" error on some systems:
I would use
xargs -Iinstead since-iis deprecated. I would also copy using the--parentsoption to prevent overwriting files with the same name. To be on the safe side, I would add{}afterxargs -Ior it could result in "{}: No such file or directory" error on some systems:git ls-files --modified | xargs -I {} cp --parents {} ~/temp