---
title: "What happens to uncommitted changes when Claude Code switches branches?"  
description: "What happens to uncommitted changes when Claude Code switches branches?"  
author: "Magdalena Michalska"  
published: 2026-10-16  
updated: 2026-10-16  
canonical: https://www.mindstick.com/forum/162461/what-happens-to-uncommitted-changes-when-claude-code-switches-branches  
category: "Claude Code"  
tags: ["Claude", "Claude Code", "git"]  
reading_time: 1 minute  

---

# What happens to uncommitted changes when Claude Code switches branches?

I use Claude Code while working on a feature branch, and sometimes need to switch branches to check a bug elsewhere. I’m unsure how it handles files I’ve edited but haven’t committed yet.

Does anyone have a reliable workflow for switching branches without losing or accidentally carrying over uncommitted changes? I’d especially like to hear what happens when the assistant is in the middle of a task.


---

Original Source: https://www.mindstick.com/forum/162461/what-happens-to-uncommitted-changes-when-claude-code-switches-branches

Copyright © MindStick Software Pvt. Ltd. This Markdown version is provided for developers, AI systems, and offline reading.
