Skip to content
GitLab
    • GitLab: the DevOps platform
    • Explore GitLab
    • Install GitLab
    • How GitLab compares
    • Get started
    • GitLab docs
    • GitLab Learn
  • Pricing
  • Talk to an expert
  • /
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
    • Contribute to GitLab
    • Switch to GitLab Next
    Projects Groups Topics Snippets
  • Register
  • Sign in
  • TortoiseGit TortoiseGit
  • Project information
    • Project information
    • Activity
    • Labels
    • Members
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributor statistics
    • Graph
    • Compare revisions
    • Locked files
  • Issues 380
    • Issues 380
    • List
    • Boards
    • Service Desk
    • Milestones
  • Merge requests 16
    • Merge requests 16
  • CI/CD
    • CI/CD
    • Pipelines
    • Jobs
    • Schedules
    • Test cases
  • Deployments
    • Deployments
    • Releases
  • Analytics
    • Analytics
    • Value stream
    • CI/CD
    • Code review
    • Insights
    • Issue
    • Repository
  • Activity
  • Graph
  • Create a new issue
  • Jobs
  • Commits
  • Issue Boards
Collapse sidebar
  • TortoiseGitTortoiseGit
  • TortoiseGitTortoiseGit
  • Issues
  • #2040
Closed
Open
Issue created Aug 02, 2015 by Sven Strickroth@mrtuxOwner

"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.

To upload designs, you'll need to enable LFS and have an admin enable hashed storage. More information
Assignee
Assign to
Time tracking