From a077dbacb5d60d49249df39bb389b12b71cb6205 Mon Sep 17 00:00:00 2001 From: scbj Date: Mon, 5 Jan 2026 10:06:31 +0100 Subject: [PATCH] (git) added section on tags --- git.md | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) diff --git a/git.md b/git.md index d38d372..b50f65a 100644 --- a/git.md +++ b/git.md @@ -147,3 +147,23 @@ This is only necessary, if the 'main' branch progressed in the mean time, otherw Replace the `pick` with `squash` or just `s` for all commits to be combined. Afterwards a force push is needed (`git push --force-with-lease`) + +## tags + +Tags are labels for specific commits, for example to mark a tested commit as release. +A tag can be created with the following command: + +```sh +# annotated (unsigned) tag +# the commit hash can be omitted to just use the commit HEAD points to +git tag -a +``` + +Tags remain local and are not synced with push by default. +To upload tags with push, add the flag `--tags`: + +```sh +git push --tags +``` + +