Removing Commit

EXITE TWO WAYS TO DELETE A COMMIT:

  • HARD:
$ git reset HEAD~"order number representing the commit" --hard

E.g:

$ git reset HEAD~1 --hard

Note: In this option, it returns the commit, but deletes files related to the file.

  • SOFT:
$ git reset HEAD~"order number representing the commit" --soft

E.g:

$ git reset HEAD~1 --soft

Note: In this type it returns the commit, but does not delete the files related to the file.

 

results matching ""

    No results matching ""