How to restore files to first commit in git code example Example: git reset initial commit git update-ref -d HEAD