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.
# 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.