Back up a remote branch

Create a local backup copy of a remote branch before doing risky operations like rebasing.

git checkout -b backup-2222 origin/feature/PROJ-2222

How it works

Verify the backup

git log --oneline backup-2222 -5

Use cases

Now you can safely rebase feature/PROJ-2222 knowing you have backup-2222 to fall back to if things go wrong!