Search code examples
githubgithub-api

Is there a way or github api to check exactly WHEN a hard reset was performed on a given branch


We are performing the following

    git checkout copy_from_branch
    git checkout branch_getting_changed
    git reset --hard origin/copy_from_branch

Now, branch_getting_changed becomes exact copy of copy_from_branch in terms of commits.

Since they are exact copies, we are not able to check the TIMESTAMP of exactly when the reset action was performed on the branch_getting_changed.


Solution

  • If the reset is executed locally, in your local git repository, you can then refer to git reflog

    git reflog --date=iso
    

    You will see the reset entry, and its associated date.