You need to create a tag named v3.0.5 in a local Git repository and make that tag available in the remote repository. Which two commands should you run? (Select two.)
Choose an answer
Tap an option to check your answer.
Correct answer: git push origin v3.0.5, git tag v3.0.5.
Why this is the answer
To create a tag locally, you use the git tag <tagname command. So, git tag v3.0.5 creates the tag v3.0.5 in your local repository. By default, git push does not push tags to the remote repository. To push a specific tag to the remote, you must explicitly specify it with git push origin <tagname. Therefore, git push origin v3.0.5 pushes the newly created local tag to the origin remote. git push --force is used to overwrite history on the remote and is not needed for pushing a new tag. git commit -m 'tag v3.0.5' and git add 'tag v3.0.5' are for committing changes to the repository's history, not for creating or pushing tags.
Pass your exam — without the endless answer hunt
Get every verified question and explanation for this exam in one place, and save hours of prep. 1,000+ certifications · 20+ languages · free to start.
Pass your exam faster → No card needed