In the context:
git revert HEAD~2 myFile
fatal: bad revision '/Users/rose/gitTest/myFile'
If you only want to revert a single file to its state in a given commit, you actually want to use the
git checkout HEAD~2 myFile
revert command is used for reverting entire commits (and it doesn't revert you to that commit; it actually just reverts the changes made by that commit - if you have another commit after the one you specify, the later commit won't be reverted).