From 816ed6228cee2d6a020f2540137d4c3903bef10a Mon Sep 17 00:00:00 2001 From: Ric Harvey Date: Wed, 1 May 2024 17:03:11 +0100 Subject: [PATCH] add tagging --- README.md | 21 ++++++++++++++++++++- 1 file changed, 20 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index 004c438..304b4fb 100644 --- a/README.md +++ b/README.md @@ -63,7 +63,26 @@ gitGraph ### HEAD -### Tags and Releases +The most recent commit on the currently checked-out branch is indicated by something reffered to as the HEAD. This is a pointer to any UID within the repository and when new commits are pushed the HEAD updates. This is how git knows to compare your commit with the HEAD to make a diff on the remote repository. + +If you have a branch checked out HEAD points to the latest commit on that branch. + +You can also get something called **detached HEAD state** which is where the HEAD isn't pointing to the latest commit of the branch, but we'll deal with that later. + +### Tags + +You can also take those UID's and tag them. You usually use this feature to mark a particular milestone on the main branch such as the release of v1 or v1.1 and so on. They mark the particular UID meaning that someone is able to check out the code that went into a v1 package for example. We can visualise this with the diagram below. + +```mermaid +gitGraph + commit + commit tag: "RC_1" + commit + commit tag: "v1" + commit + commit + commit tag: "v1.1" +``` ## Forks