Reputation: 1750
I a trying to delete the last commit from the local repository by using the
git reset --hard HEAD~1
command. However I get the following error:
fatal: Could not reset index file to revision 'HEAD~1'.
I get
(Filename too long)
for several files. How can I avoid this? I am on Windows
Upvotes: 11
Views: 11045
Reputation: 1324278
Try to see if those error persists with:
git config --system core.longpaths true
Make sure to use the latest git-for-windows (2.7.0), and you should not even need that option.
Upvotes: 9