If you are in different branch other than old-branch,
git branch -m <old-branch> <new-branch>
eg. git branch -m load_data feature/load_data
If you are in the old-branch,
git branch -m <new-branch>
eg. git branch -m feature/load_data
git push <remote> -d <old-branch>
e.g. git push origin -d load_data
git branch --unset-upstream
git push
NOTE: your git config needs to have the following setting =>
push.default = true
or
push.autosetupremote = true
Note
Instead of Step 3 and 4, you can run the following command directly
git push <remote> -u <new_branch>
or
git push <remote> --set-upstream <new_branch>
e.g.
git push origin -u feature/load_data
or
git push origin --set-upstream feature/load_data
-u or --set-upstream tells Git to set the upstream branch for the current local branch to the specified new remote branch.
This set up a tracking relationship between the current location branch and the remote branch you're pushing to.