# Git Stash and Git Tags

> How git stash parks half-done work so you can switch branches. How a tag names a release like v1.0, and why tags need a push of their own.

**Course:** [Git and GitHub](https://learn.benibix.com/learn/development-version-control)  
**Time:** 11 min

**After this lesson you can:**

- Park changes with git stash
- Mark a release with a tag
- Push a tag so others can see it

## How to park work, and how to name a release

Git stash takes the changes you have not committed and puts them aside, leaving your files clean. Git stash pop brings them back. It is for the moment you must switch branches but are not ready to commit. Stashes pile up with the newest on top, and the top one is called stash@{0}.

Say you are halfway through a new form when a bug report comes in. Git may refuse to switch branches, because your changes would clash with the other branch's files. You stash, switch, fix the bug, switch back and pop. Your half-done form is back exactly as you left it.

Git stash list shows every stash, with the branch it came from and the commit it sat on. Git stash pop takes the top one back and removes it from the pile. If the pop clashes with changes made since, you fix the conflict as in a merge. The stash then stays on the pile until you drop it.

A stash lives only on your computer. It is never pushed, and nobody else can see it. It also has no clear name unless you give one with git stash push -m and a message. A stash left for a month is a puzzle, because you will not remember what was in it.

A tag is a fixed name on one commit. It usually marks a release, such as v1.0 or v2.3.1. Unlike a branch, a tag never moves when new commits arrive. Years later, you can check out v1.0 and see the code exactly as it was shipped.

Release names often follow semantic versioning: three numbers, called major, minor and patch. In 2.3.1, the major version is 2, the minor is 3 and the patch is 1. A change that breaks old code bumps the first number. A new feature bumps the second, and a bug fix bumps the third.

There are two kinds of tag. A lightweight tag is only a name. An annotated tag, made with git tag -a, also stores who made it, when, and a message. Most teams use annotated tags for releases, because they record who shipped what.

The usual mistake is forgetting that a plain git push does not send tags. The tag sits on your computer, and nobody else sees the release. Push one tag by naming it, as in git push origin v1.0, or push all of them with git push --tags.

```console
$ git stash
Saved working directory and index state WIP on main: 0daa45d Blue title
$ git stash list
stash@{0}: WIP on main: 0daa45d Blue title
$ git tag -a v1.0 -m "First release"
$ git tag
v1.0
```
Park the half-done work, then name a release. Neither one leaves your computer until you push it.

![A timeline of one version's life, left to right. Alpha, 2.0.0-alpha.1, for the team. Beta, 2.0.0-beta.1, for testers. Release candidate, 2.0.0-rc.1, the last check. The stable release, 2.0.0, marked in the accent colour. Then updates such as a security patch, 2.0.1. At the far right, end of life, where updates stop.](https://learn.benibix.com/diagrams/dev5-release-stages.svg)

### Example: Lucy ships version 1.0

Lucy's app is ready on Friday. She runs git tag -a v1.0 on the last commit and pushes the tag.

In March, a user on v1.0 reports a bug. Lucy checks out v1.0, finds the bug in 10 minutes, and ships the fix as v1.0.1.

**Words in this lesson:** [Git Stash](https://learn.benibix.com/term/development/git-stash), [Git Tag](https://learn.benibix.com/term/development/git-tag), [Semantic Versioning (SemVer)](https://learn.benibix.com/term/development/semantic-versioning)

**Question:** Why can my team not see the tag I just made?

**Answer:** A plain git push does not send tags. Tags stay on your computer until you push them on purpose. Push one by name, or push them all with git push --tags.

---

Source: https://learn.benibix.com/learn/development-version-control/git-stash-and-git-tags
Author: Behnia Zarei (a developer in Vienna, Austria, who builds and teaches data, AI and business intelligence at BENIBIX)
Publisher: BENIBIX Learn (https://learn.benibix.com/)
Last updated: 2026-11-19
Licence: CC BY 4.0 (https://creativecommons.org/licenses/by/4.0/). Quote freely with attribution.
