search

Home  >  Q&A  >  body text

How to find the history of operations on a Git server

How to view operations on git? For example, who deleted what branch and who created what branch
I deleted the branch named ‘A’ on Git and then re-created it. So, how to restore the deleted branch ‘A’? There is some data that needs to be restored

迷茫迷茫2811 days ago595

reply all(2)I'll reply

  • 过去多啦不再A梦

    过去多啦不再A梦2017-05-02 09:39:17

    $ git reflog

    reply
    0
  • PHP中文网

    PHP中文网2017-05-02 09:39:17

    $ git reflog
    $ git branch branch_name commit_hash

    Find the corresponding commit_hash code of each submission through the reflog, find the hash of the submission that needs to be restored, and then perform local recovery through the following commands. The recovery is to restore the local one. After recovery, just get the corresponding file locally.

    reply
    0
  • Cancelreply