From 720939426a8a3b4bf0131115900c8467f4aa86ef Mon Sep 17 00:00:00 2001 From: Antoine Amara Date: Mon, 5 Oct 2020 16:30:10 +0200 Subject: [PATCH] git-describe: add page (#4413) --- pages/common/git-describe.md | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) create mode 100644 pages/common/git-describe.md diff --git a/pages/common/git-describe.md b/pages/common/git-describe.md new file mode 100644 index 000000000..202a0bbbe --- /dev/null +++ b/pages/common/git-describe.md @@ -0,0 +1,24 @@ +# git describe + +> Give an object a human readable name based on an available ref. +> More information: . + +- Create a unique name for the current commit (the name contains the most recent annotated tag, the number of additional commits, and the abbreviated commit hash): + +`git describe` + +- Create a name with 4 digits for the abbreviated commit hash: + +`git describe --abbrev={{4}}` + +- Generate a name with the tag reference path: + +`git describe --all` + +- Describe a git tag: + +`git describe {{v1.0.0}}` + +- Create a name for the last commit of a given branch: + +`git describe {{branch_name}}`