GitKraken Desktop Documentation

Detached HEAD in GitKraken Desktop

Last updated: January 2026

Detached HEAD state lets you check out any commit in GitKraken Desktop without creating a branch. This is useful for reviewing or experimenting with past changes without affecting your active branches.


Enter Detached HEAD State

  1. Right-click the commit you want to inspect.
  2. Select Checkout this commit.
Context menu showing 'Checkout this commit' option in GitKraken Desktop after right-clicking a specific commit in the graph view
Check out any past commit without creating a new branch.

The checked-out commit will display a HEAD label, indicating you’re in detached HEAD state.

GitKraken Desktop showing HEAD label attached to a specific commit in the graph, indicating the currently checked-out commit
GitKraken tags the commit with HEAD.

You can now review the full history and diffs, or create a branch from this state.


Commit in Detached HEAD State

You can make changes and commit them while in this state. However, these commits won’t belong to any branch.

GitKraken Desktop interface showing a warning banner that says 'You are in a detached HEAD state' above the commit panel with unstaged changes listed
GitKraken shows a warning when you commit in detached HEAD state.

To preserve your work, create a branch from the current commit:

  1. Right-click the commit tagged as HEAD.
  2. Select Create branch here.
Context menu in GitKraken Desktop showing the option 'Create branch here' when right-clicking a commit labeled HEAD
Start a branch from your current detached commit to keep your changes.

Exit Detached HEAD State

To exit detached HEAD state:

  • Check out any local branch.

This will remove the HEAD label and discard any unpreserved commits.

Animation showing how unbranched commits in GitKraken Desktop are removed from view after switching branches from a detached HEAD state
Unbranched commits are removed when you check out another branch.

Important: Commits made in detached HEAD state will be lost unless you create a branch. You may be able to recover them manually.


Recover Lost Commits

If you accidentally switch branches before saving your changes:

Have feedback about this article? Did we miss something? Let us know!
On this page