A developer needs to mark the current commit as a stable release point for a project. To ensure the tag includes the developer's name, email, date, and a specific message, which Git command should be used?
The command git tag -a v1.5 -m 'Stable release candidate' creates an annotated tag. The -a option tells Git to create an annotated tag object that stores the tagger's name, email, and timestamp, while -m attaches the release message.
Using git tag v1.5 would create a lightweight tag that contains only a pointer to the commit and no metadata or message. The git commit and git add commands cannot create tags and the --tag option is not valid for them.
Ask Bash
Bash is our AI bot, trained to help you pass your exam. AI Generated Content may display inaccurate information, always double-check anything important.
What is the difference between an annotated tag and a lightweight tag in Git?
Open an interactive chat with Bash
How do I view all tags in a Git repository?
Open an interactive chat with Bash
Can I delete or move a Git tag if I need to rename or reassign it?
Open an interactive chat with Bash
CompTIA Linux+ XK0-006 (V8)
Automation, Orchestration, and Scripting
Your Score:
Report Issue
Bash, the Crucial Exams Chat Bot
AI Bot
Loading...
Loading...
Loading...
IT & Cybersecurity Package Join Premium for Full Access