git push --transfer the contents of the local repository to the remote repository
You can use the git push command to transfer the contents of the local repository to the remote repository and update the beginning of the branch.
# Transfer the contents of the local repository to the remote repository #Update the location of the main branch of the remote repository git push origin main
To add a tag to a remote repository
To transfer the tag to a remote repository, specify the tag name instead of the branch name.
git push origin tag name
Add all tags to remote repository
If you want to add all tags to the remote repository, specify "--tags" as an argument.
git push origin --tags
Is it better to make the branch name explicit?
Yes. It's a good idea to explicitly specify the branch name. If you omit the argument, versions prior to Git 2.0 will update the beginning of every branch.
Let's explicitly specify the branch name until Git 2 is widely installed.