Skip to content
Foxipa
Code Completion 4 Challenges

Complete the Git commands: Git Describe: Ref-Based Human-Readable Names

Create a disposable repository with an annotated tag and a lightweight tag, then add commits after the tags. Capture the output of `git describe HEAD`, `git describe --tags HEAD`, and `git describe --all HEAD`. Check out the annotated tag and demonstrate the exact-tag result. Return to the branch, modify a tracked file, and demonstrate `git describe --tags --dirty`. Explain why the candidate set changes between the three forms and confirm that none of the commands changes the repository refs.

Advanced ~6 min read

Challenge 1

Complete the Git command to produce a human-readable commit name.

bash Your answer
git  HEAD

Press Ctrl⌘Enter to check your answer

Challenge 2

Complete the Git command to produce a human-readable commit name.

bash Your answer
git  --tags HEAD

Press Ctrl⌘Enter to check your answer

Challenge 3

Complete the Git command to produce a human-readable commit name.

bash Your answer
git  --all HEAD

Press Ctrl⌘Enter to check your answer

Challenge 4

Complete the Git command to produce a human-readable commit name.

bash Your answer
git  --tags --dirty

Press Ctrl⌘Enter to check your answer