I don't know if this is the expected phenomenon of git but I think I may have found a strange bug.
I have a script that copies file from specific commit to another location
example
git -C C:\Users\testDir show ${hash of the commit}:test.csv > C:\Users\anotherTestDir\test.csv
This works as expected EXCEPT when I only have one commit.
When I have a single commit, it makes system cannot find the file specified error.
After I do another commit and run exact same command, it works perfectly.
Even stranger phenomenon is that when I only have one commit and use relative path, it works
example
git -C .\ show ${hash of the commit}:test.csv > .\test.csv
Is this an expected behaviour? If it is, what would be the solution to be able to use the same command when there's only one commit?
Windows CMD

Webstorm console

Per the comments: use C:/Users/testDir instead of C:\Users\testDir as parameter.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With