Switch branches with uncommitted changes

ComputerWeb app2 min readUpdated October 3, 2026

If switching branches would overwrite changes you haven't committed, Enjoy lists those files and lets you commit them before it switches.

Usually your uncommitted changes come with you when you switch branches. When Git can’t switch without overwriting some of them, Enjoy stops and shows Commit changes to switch branch, so nothing is lost.

Steps

  1. Review the files

    The window lists each file that switching would overwrite, with the lines added and removed, or Binary for files such as images.

  2. Choose to commit

    Select Commit and switch branch…. A Commit message box appears.

  3. Describe the changes

    Type a short message, such as “Update homepage text”.

  4. Select Commit & switch

    Enjoy commits the listed files on your current branch, then switches. The window closes when it’s done.

To stay where you are instead, select Cancel. Nothing changes.

Good to know

  • Only the listed files go into the commit. Your other uncommitted changes stay uncommitted and come with you to the new branch.
  • The commit stays on the branch you were on. Switch back to that branch to find it.
  • To keep these changes off your current branch, select Cancel and create a new branch. The changes come with you, and you can ask your agent to commit them there. See Create and switch branches.
  • The same window can appear when you choose Switch back to a branch in The branch changed notice. See When another conversation switches the branch.
  • While an agent works in the project’s main folder, the window says “Stop active work in this project to continue.”

If something goes wrong

The window says Commit saved

The commit worked, but the switch didn’t finish. The window says which branch the commit was saved on, and why the switch stopped. Your changes are safe in that commit. Select Retry switch. If other files now block the switch, Enjoy lists them so you can commit those too.

The file list is out of date

Messages such as “This file review expired.” or “The files, staging area, or branch changed since this review.” mean the list is out of date, for example because files changed while the window was open. Select Refresh files, then commit again.

“Finish the current Git operation before committing and switching branches.”

Git is in the middle of something else, such as a merge. Ask your agent to finish or cancel it, then try again.

Git can’t make the commit

If the message says Git doesn’t know your name or email, ask your agent to set them up, then try again.

Did this help?

Still need a hand?

Email help@enjoy.dev with your computer, your Enjoy version, and what happened. Leave out passwords and sign-in codes. For questions and ideas, join our Slack community .