At the Git Bash prompt, type exit to leave the shell. Files already saved on disk remain there, including uncommitted changes. The command does not save an editor buffer, create a commit or protect a running process.

Check before closing

  1. Save any files open in an editor. If Vim or Nano is using the terminal, save and quit that editor first.
  2. Inside a repository, inspect its status:
git status --short
jobs

git status reports tracked changes and non-ignored untracked files. jobs shows jobs known to this shell. Finish or deliberately stop work that depends on this session before closing it.

Exit at the shell prompt

exit

You can reopen Git Bash, return to the repository and inspect the same saved changes. A commit records a project snapshot, while a push sends commits to a remote; neither is required just to close a shell. Use them as part of your intended version-control workflow, not as a blanket exit command.

A stash is also optional and changes the working tree. Its default behavior does not include untracked files, so it should not be presented as a universal save button.

To find your project again, use Bash directory navigation. If your Explorer shortcut is missing, see restoring access to Git Bash.

Sources and verification

Saved-file persistence across a Bash exit is checked in a disposable local Git repository. No user repository was changed.