add tagging

This commit is contained in:
Ric Harvey 2024-05-01 17:03:11 +01:00
parent 3fb49cc642
commit 816ed6228c
Signed by: ric
GPG key ID: 7FDEB4C0C7D5CB61

View file

@ -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