GIT command to delete the last log without affecting the current version

Asked

Viewed 82 times

-1

I would like to delete the last commit log that I did, the commit log that’s there is from a file that I deleted, but I don’t want it to be in versioning, which git command I need to do for it?

1 answer

1


Ivan,

1. Make a backup (as a precaution)

Now, to reverse the last commit but keep the changes (your case):

git reset HEAD~

If you don’t want the last commit changes to stay:

git reset --hard HEAD~
  • Thank you very much!

  • Imagine, for nothing! If the answer was useful, please mark it as solved!

  • I just saw that I didn’t have an appointment.

Browser other questions tagged

You are not signed in. Login or sign up in order to post.