Skip to main content
added 6 characters in body
Source Link
Aurangzeb
  • 1.7k
  • 14
  • 10

if you u used

git rm filename 

to delete a file then

git checkout path/to/filename 

doesn't work, so in that case

git checkout HEAD^ path/to/filename 

should work

if you u used

git rm filename 

to delete a file then

git checkout path/to/filename 

doesn't work, so in that case

git checkout HEAD^ filename 

should work

if you used

git rm filename 

to delete a file then

git checkout path/to/filename 

doesn't work, so in that case

git checkout HEAD^ path/to/filename 

should work

Source Link
Aurangzeb
  • 1.7k
  • 14
  • 10

if you u used

git rm filename 

to delete a file then

git checkout path/to/filename 

doesn't work, so in that case

git checkout HEAD^ filename 

should work