> For the complete documentation index, see [llms.txt](https://docs.copia.io/docs/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.copia.io/docs/git-based-source-control/advanced/stashing-changes.md).

# Stashing Changes

## Overview

Stashing lets you temporarily set aside changes you've made without committing them. When you stash, your changes are removed from your files and saved for later, leaving you with a clean working state. Stashed changes are stored in temporary system folders and any stashed changes will not appear in your working directory.

If you make a commit to a branch with stashed changes they will appear as a separate branch with no name. To clear these stashed changes, you can discard or merge them later.

<figure><img src="/files/3HMMVFaNeKWdwow6CP65" alt=""><figcaption></figcaption></figure>

## How to stash changes in the Desktop App

When you have changes you want to stash, you right-click on the `changed file in current repository` heading to reveal the context menu to make the stash

<figure><img src="/files/f2idY6JTWX922IqAhXLq" alt=""><figcaption></figcaption></figure>

<figure><img src="/files/isZgv8rotXv9MigyhbU8" alt=""><figcaption></figcaption></figure>

When you stash the changes, your Changes tab will appear empty.

You will also be offered an option to stash changes when switching a branch while you have uncommitted changes. If you stash changes, your new branch will show no new changes.

<figure><img src="/files/dkWJ52Vio1SzrjTlNQxW" alt=""><figcaption></figcaption></figure>

## How to view and restore your stashed changes

Restoring a stashed change brings those changes back to your changes tab, ready for a commit. This can potentially cause a conflict if stashed changes and current changes are overlapping.

To view stashed changes in the Desktop App, select the "Stashed Changes" heading above the commit message area in the bottom right corner of the app.

<figure><img src="/files/xbI1G2jDhP0jv5mlxDAQ" alt=""><figcaption></figcaption></figure>

Once your stashed changes are visible, you can choose to restore or discard your changes.

<figure><img src="/files/tyuKJUO6AgSRjqFBPRA2" alt=""><figcaption></figcaption></figure>

To discard the changes, when viewing, instead of selecting "Restore" you can "Discard". Discarding changes removes the changes entirely, meaning they will no longer be stored locally or in any temporary storage.


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://docs.copia.io/docs/git-based-source-control/advanced/stashing-changes.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
