Skip to content
Foxipa
Code Completion 4 Challenges

Complete the Git commands: Git Tag Inspection and Deletion

Create a disposable repository with at least three commits and create both lightweight and annotated tags using the V457 creation rules. List all tags, then use a pattern to isolate one naming family. Use `--points-at` on a commit that has both tag forms and use `--contains`, `--merged`, and `--no-merged` against chosen commits so that you can explain the different questions each filter answers. Inspect an annotated tag with `git show` and its listing annotation with `git tag -n`. Finally, delete one lightweight tag and one annotated tag. Before each deletion, save the resolved reference value; after deletion, verify that `refs/tags/<name>` no longer resolves. For an annotated tag, optionally inspect the saved tag-object ID immediately after deletion to demonstrate why deleting a reference is not the same as deleting an object. Perform all deletion work in the disposable repository. Success requires a written state record for each filter and deletion: the tags present before the operation, the exact question the command answers, the reference state after deletion, and—if tested—the immediate object type of a saved tag-object ID. Do not use the Foxipa source repository for destructive demonstrations.

Intermediate ~6 min read

Challenge 1

Complete the Git command to inspect or manage tags.

bash Your answer
git  -n

Press Ctrl⌘Enter to check your answer

Challenge 2

Complete the Git command to inspect or manage tags.

bash Your answer
git  -l

Press Ctrl⌘Enter to check your answer

Challenge 3

Complete the Git command to inspect or manage tags.

bash Your answer
git  -l "v2*"

Press Ctrl⌘Enter to check your answer

Challenge 4

Complete the Git command to inspect or manage tags.

bash Your answer
git  --points-at HEAD

Press Ctrl⌘Enter to check your answer