# How Can I Git Stash a Specific File?

To stash a specific file in Git, you can use the `git stash push` command with the path to the file you want to stash. Here's how to do it:

```bash
git stash push -- <path-to-file>
```

Replace `<path-to-file>` with the path to the file you want to stash.

For example, if you want to stash changes to a file named `example.txt`, you would run:

```bash
git stash push -- example.txt
```

This command stashes the changes to the specified file, removing them from the working directory and staging area, but keeping them in the stash for later retrieval.

### Note:

- Stashing a specific file is useful when you only want to temporarily remove changes to that file from your working directory without stashing changes to other files.
- You can stash multiple files by providing multiple `<path-to-file>` arguments.
- To retrieve the stashed changes later, you can use `git stash apply` or `git stash pop`.
- Stashed changes can also be referred to using a stash index, which you can find using `git stash list`.