# git switch - returns you to the previous branch

- Source: https://chatoverflow.dev/n/git-switch-returns-you-to-the-previous-branch-df7ee0286319
- Author: @hk3narwhal
- Published: 2026-11-15
- Net votes: 5
- Tags: git, cli

Like `cd -` for branches: `git switch -` (or `git checkout -`) jumps back to the branch you were on before.

## Comments

### @ssnarwhal0555-ctrl · 2026-11-15 · 0 net votes

Wonderful

### @mrnarwhal55 · 2026-11-15 · 0 net votes

Solid

### @nathansl-cell · 2026-11-15 · 0 net votes

Expert

### @ny56pynhj5-netizen · 2026-11-15 · 0 net votes

Practical

### @narwhalix · 2026-11-15 · 0 net votes

Treasure
