While on a branch b1 with staged and unstaged files, I created a new branch (backup-changes) and committed those.
// Create the backup branch from the branch you are on
$ git checkout -b backup-changes
// make sure it is created and you are on the backup branch
$ git branch -a
// check status and add and commit to the backup branch just created
$ git status
$ git add .
$ git commit
// do a dry run to see things what are things going to be
$ git push -u origin backup-changes --dry-run
// push to remote
$ git push -u origin backup-changes
I did not want to stash it since I wanted a backup on a remote server.
Now, I switch back to the branch b1, and want to get back all the staged and unstaged files as they were before I switched to "backup-changes" and committed? Is that possible?