php - After git commits forcefully, can the files in the remote warehouse be retrieved?
phpcn_u1582
phpcn_u1582 2017-07-01 09:12:05
0
2
914

The remote warehouse is completely inconsistent with the local warehouse. I accidentally forced a submission. git push origin master -f was completely overwritten. Can I still roll back now?

phpcn_u1582
phpcn_u1582

reply all(2)
为情所困

After executing git reset, the contents in the .git/objects folder are not deleted accordingly.

Run git reflog to find the previous commit ID (commit_id)

Then git reset --hard commit_id

为情所困

Yes, git reset --hard HEAD~1

Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template