Error trying to reset git HEAD

I am trying to remove the last commit from the local repository using

git reset --hard HEAD~1 

teams. However, I get the following error:

 fatal: Could not reset index file to revision 'HEAD~1'. 

I get

 (Filename too long) 

for multiple files. How can i avoid this? I am on Windows

+5
source share
1 answer

Try checking if this error persists:

 git config --system core.longpaths true 

Be sure to use the latest git -for-windows (2.7.0) and you will not need this option.

+2
source

Source: https://habr.com/ru/post/1241242/


All Articles