In git, I’m trying to check out versions of a specific repository into a version folder inside of a temp folder, but when I do
git checkout master~X C:/file/path/temp/versionX
I get the error
error: pathspec 'temp/versionX' did not match any file(s) known to git.
What’s causing the problem and how do I fix it?
git checkoutonly operates inside the “working tree”. To do what you want, change Git’s idea of what the working tree is. There are a few different ways to do this:option 1: run from the Git repository
option 2: run from the destination directory
option 3: run from some other directory