What is git reflog?

devquora
devquora

Posted On: Feb 25, 2020

 

Git holds a record of updates to the apex of branches employing a mechanism described reference logs, as known as reflogs. Various Git commands receive a parameter for defining a reference (ref), a pointer to a commit. Typical examples are; git checkout, git reset, git merge, etc.

Reflogs record when refs were refreshed in the local repository and in addition to branch tip reflogs, a special reflog is reserved for the Git stash. Reflogs are filed in directories supporting the local repository's .git directory. git reflog directories can be located at .git/logs/refs/heads/., .git/logs/HEAD, and also .git/logs/refs/stash if the git stash has been employed on the repo.

    Related Questions

    Please Login or Register to leave a response.

    Related Questions

    Git Interview Questions

    What is GIT and why do we use it?

    GIT is a Distributed Version Control System (DVCS) and Source Code Management System (SCMS) which can track changes to a..

    Git Interview Questions

    What are GIT stash and GIT stash drop?

    GIT stash:It takes the current state of working directory and index and pushes into the stack for later and returns to ..

    Git Interview Questions

    Name some GIT commands and also explain their functions?

    GIT diff – It shows the changes between commits, commits and working tree.GIT status – It shows the difference b..