Git Tips Slides
PageUp x2: previous · PageDown x2: next · Home: index

Create a backup of a branch

# Create a new branch
git switch -c foobar-backup

# Switch back from "foobar-backup" to the previous branch
git switch -

You could use tagging for this as well, but I prefer this approach.