I was initially just using copy
but I got this output:
C:\repos\AutomatedBuildTesting (master -> origin)
(2020-09-18 8:49:01.12) λ copy ".hooks/*" ".git/hooks/*"
commit-msg
The system cannot find the file specified.
0 file(s) copied.
So I tried xcopy
and after trying a few things eventually discovered it will only copy if I include the F
flag to display full file names. Can anyone explain this?
C:\repos\AutomatedBuildTesting (master -> origin)
(2020-09-18 8:48:32.95) λ xcopy ".hooks/*" ".git/hooks/*"
0 File(s) copied
C:\repos\AutomatedBuildTesting (master -> origin)
(2020-09-18 8:48:58.07) λ xcopy ".hooks/*" ".git/hooks/*" /F
Overwrite C:\repos\AutomatedBuildTesting\.git\hooks\commit-msg (Yes/No/All)? y
C:\repos\AutomatedBuildTesting\.hooks\commit-msg -> C:\repos\AutomatedBuildTesting\.git\hooks\commit-msg
1 File(s) copied
/F
flag?