xxxxxxxxxx
git branch -m old-branch-name new-branch-name
git push origin -u new-branch-name
xxxxxxxxxx
git fetch
git reset --hard origin/{{branch}}
# replace {{branch}} with name
xxxxxxxxxx
git branch branch_name --set-upstream-to your_new_remote/branch_name
xxxxxxxxxx
Delete your local branch: git branch -d local_branch
Fetch the latest remote branch: git fetch origin remote_branch
Rebuild the local branch based on the remote one: git checkout -b local_branch origin/remote_branch
xxxxxxxxxx
git fetch # only fetch all remote branches
git branch -v -a # fetch remote branches and show them
remotes/origin/test
git switch test # then go to your remote branche