Reflog
You can use the Reflog activity to view HEAD or branch history, showing every operation that moved a ref. The Reflog records resets, rebases, force-pushes, and branch deletions, so you can recover a commit even after the branch that pointed to it is gone.
Navigate the Reflog activity
To show the Reflog activity, click its activity-bar icon or click Git > Reflog.
Reflogs are listed chronologically and display the following information.
- Git operation badge: The type of operation the reflog recorded.
- Operation name: The name of the reflog.
- Commit hash: The commit hash of the operation.
- Timestamp: The amount of time since the operation occurred.
Click the Toggle compact mode icon to reduce the information provided for the reflog.
Filter reflogs
You can filter reflogs by ref, operations, and the name of the reflog. Click the Select ref dropdown to view reflogs in HEAD or the selected branch. Click the Filter by operation type dropdown to view reflogs for a specific Git action. Use the Search reflog field to filter reflogs by name.
Reflog Entry view
Click a reflog entry to open the reflog in the Reflog Entry view. The Reflog Entry view displays the following information.
- Reflog ID: The most recent reflog entry is assigned the
HEAD@{0}ID. - Git operation badge: The type of operation the reflog recorded.
- Timestamp: The amount of time since the operation occurred.
- Operation message: The message of the operation.
- Commits: The commits made before and after the reflog entry.
- Files changed: The number of files in the reflog entry.
Reflog actions
In the Reflog Entry view, click the following action icons to perform a reflog action.
| Icon | Action |
|---|---|
| Show in Commits | Shows the matching commit in the Commits activity. |
| Create branch here | Creates a branch based on the reflog. |
| Cherry-pick this commit | Cherry-picks the reflog onto the current branch. |
| Copy hash | Copies the commit hash of the reflog. |
| Reset —soft (Moves HEAD only) | Moves HEAD back to the reflog and keeps all current changes staged. |
| Reset —mixed (Moves HEAD + unstages) | Moves HEAD back to the reflog and unstages all current changes. |
| Reset —hard (discard all changes) | Moves HEAD back to the reflog and discard all current changes. |