0
0
Gitdevops~5 mins

Deployment triggers from tags in Git - Cheat Sheet & Quick Revision

Choose your learning style9 modes available
Recall & Review
beginner
What is a deployment trigger from tags in Git?
It is a way to start a deployment process automatically when a specific Git tag is created or pushed. Tags mark important points like releases.
Click to reveal answer
beginner
How do you create a lightweight tag in Git?
Use the command git tag tag_name. This creates a simple tag pointing to the current commit.
Click to reveal answer
intermediate
What is the difference between a lightweight tag and an annotated tag?
A lightweight tag is just a name for a commit. An annotated tag stores extra info like the tagger's name, date, and a message.
Click to reveal answer
intermediate
How can a CI/CD pipeline detect a new tag to trigger deployment?
The pipeline listens for Git events and checks if the push includes a tag. If yes, it runs deployment steps automatically.
Click to reveal answer
beginner
Why use tags to trigger deployments instead of branches?
Tags mark stable points like releases, so deploying from tags ensures you deploy tested versions, not ongoing work.
Click to reveal answer
Which Git command creates an annotated tag?
Agit tag -a v1.0 -m "Release 1.0"
Bgit tag v1.0
Cgit commit -m "Tag v1.0"
Dgit push origin v1.0
What event should a CI/CD system watch to trigger deployment from tags?
APull request creation
BBranch merge event
CPush event including a tag
DFile change in README
Why are tags preferred for deployment triggers over branches?
ABranches are deleted after use
BTags mark stable release points
CTags are faster to create
DBranches cannot trigger pipelines
Which command pushes tags to the remote repository?
Agit push origin --tags
Bgit push origin main
Cgit tag push
Dgit commit --tags
What is a common use of annotated tags in deployment?
ATo merge code automatically
BTo speed up commits
CTo delete branches
DTo store release notes and author info
Explain how deployment triggers from tags work in a Git-based CI/CD pipeline.
Think about what happens when you push a tag and how the pipeline reacts.
You got /4 concepts.
    Describe the difference between lightweight and annotated tags and why annotated tags are useful for deployments.
    Consider what extra info annotated tags provide.
    You got /4 concepts.