0
0
Gitdevops~10 mins

Tagging specific commits in Git - Interactive Code Practice

Choose your learning style9 modes available
Practice - 5 Tasks
Answer the questions below
1fill in blank
easy

Complete the code to create a lightweight tag named 'v1.0' on the current commit.

Git
git tag [1]
Drag options to blanks, or click blank then click option'
A-f v1.0
B-a v1.0
C-m "version 1.0" v1.0
Dv1.0
Attempts:
3 left
💡 Hint
Common Mistakes
Using -a or -m creates an annotated tag, not lightweight.
Forcing a tag with -f is not needed here.
2fill in blank
medium

Complete the code to create an annotated tag 'v2.0' with the message 'Release version 2.0'.

Git
git tag [1] v2.0 -m "Release version 2.0"
Drag options to blanks, or click blank then click option'
A-a
B-l
C-f
D-d
Attempts:
3 left
💡 Hint
Common Mistakes
Using -f forces overwriting a tag, not creating annotated tags.
The -l option lists tags, it does not create them.
3fill in blank
hard

Fix the error in the command to tag commit 'abc123' with tag 'v3.0'.

Git
git tag v3.0 [1]
Drag options to blanks, or click blank then click option'
Aabc123
B-m abc123
C-a abc123
DHEAD~1
Attempts:
3 left
💡 Hint
Common Mistakes
Adding -m or -a before the commit hash causes errors.
Using HEAD~1 tags the previous commit, not the specified one.
4fill in blank
hard

Fill both blanks to create an annotated tag 'v4.0' on commit 'def456' with message 'Version 4 release'.

Git
git tag [1] v4.0 [2] -m "Version 4 release"
Drag options to blanks, or click blank then click option'
A-a
B-f
Cdef456
D-d
Attempts:
3 left
💡 Hint
Common Mistakes
Using -f forces overwriting tags, not needed here.
The -d option deletes tags, not creates them.
5fill in blank
hard

Fill all three blanks to delete a tag named 'v5.0' both locally and remotely (remote named 'origin').

Git
git tag -d [1] && git push [2] :refs/tags/[3]
Drag options to blanks, or click blank then click option'
Av5.0
Borigin
Dupstream
Attempts:
3 left
💡 Hint
Common Mistakes
Using wrong remote name causes failure to delete remote tag.
Forgetting to delete the remote tag leaves it still available.