GitKraken Desktop Documentation

Detached HEAD State

Last updated: May 2025

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.
Right-clicking a commit to checkout
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.

HEAD label on 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.

Commit warning in detached state
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.
Create branch from detached 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.

Discarding commits on branch checkout
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