"fatal: pathspec did not match any files" error when resolving deleted/modified conflict
By xavier.poi... on December 18, 2013 09:47 (imported from Google Code)
I use and mix both the command line and TortoiseGit in my Git workflow, and use the tgit TortoiseGitProc alias (from Posh-Git) to call TortoiseGit from the command line.
Not sure if this is fully supported, but there is an error message than appears when trying to resolve conflicts in a rebase (in fact, they still seem to be resolved correctly despite the error message).
When rebasing say a feature branch on the master branch, and the master branch has some files deleted, while the feature branch has changes made to these same files, this is what happens:
git checkout feature
git rebase master
... conflicts ...
tgit resolve
Then in the resolve dialog, double-click on a conflicted file, a dialog will ask if you want to delete the file or keep the modified version. Choose "Delete". Then when closing the dialog with the OK button, this message will appear:
fatal: pathspec 'path/to/file' did not match any files
Complete repro:
git init
echo test > test.txt
git add test.txt
git commit -m "initial commit"
git checkout -b feature
echo test >> test.txt
git add test.txt
git commit -m "added text"
git checkout master
rm test.txt
git rm test.txt
git commit -m "deleted file"
git checkout feature
git rebase master
tgit resolve
Then double-click test.txt and choose "Delete", then "Ok".
Using TortoiseGit 1.8.6.0 and msysgit 1.8.1.