Reviewed for reference consistency: April 11, 2026
Data Loss Risk
HIGH RISKGit stopped to prevent overriding unsaved work. Do not force commands without stashing or committing first.
What To Know
Where Did It Fail?
Commands That Trigger This
Technical Background
This is one of Git's primary safety features. Uncommitted changes exist only on your local disk.
Git only blocks the checkout if the target branch differs from your current branch for the modified files. If the file is identical in both branches, Git allows the checkout and carries your uncommitted changes over.
Underlying Causes
Frequently Asked Questions
Yes, if the changes do not conflict with the target branch. If they do conflict, Git forces you to commit or stash them first.
Related Git States
Git aborted the merge to protect uncommitted changes in your working directory.
Git aborted the merge because it would overwrite untracked files in your working directory.
You checked out a specific commit, detaching your working directory from the branch history.