Skip to main content
Middle

Git Describe

Middle

Task

Create a new commit on main, mark it with the tag v2, and then get a text description of the current position relative to the nearest tag.

Steps

  1. Make one commit on main.
  2. Create the tag v2 on the new commit.
  3. Run the command that describes the current commit.

Expected result

main, HEAD and the tag v2 must point to the new commit. The describe command must not change the graph.

What you will learn

After completing the task, you will be able to:

  • mark a release commit with a tag;
  • use describe as a human-readable version label;
  • tell commands that read history apart from commands that change it.
Goal
localC0C1C2HEAD main #v2
Git trainer0 commands
terminal
localC0C1HEAD main