First, rename the local branch by typing:
git branch -m <old_name> <new_name>
Then push the new branch to the remote repository:
[OPTIONAL] list the keygrip IDs using
gpg --list-secret-keys --with-keygrip
If ALL your private keys are on external cards like the Yubikey, you can delete them all using:
rm -r ~/.gnupg/private-keys-v1.d