git push <remote_name> '*:*'
The command is intuitive in that it specifies the :
. The one on the left of :
indicates the name of the local branch and the one on the right specifies the remote branch. In your case, we want to map with the same name and thus the command.
The *:*
tells git that you want to push every local branch to remote with the same name on remote. Thus if you have a branch named my_branch
you will have a remote branch named <remote_name>/my_branch
.
So typically you would do git push origin '*:*'
and you would find every local branch with the same name in the remote, which you can confirm by git branch -r
which will show you all the remote branches.