From b57c23703336883211d905e868520bceae76c8e0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Hugo=20H=C3=B6rnquist?= Date: Thu, 2 Feb 2023 11:21:01 +0100 Subject: tor 2 feb 2023 11:21:01 CET --- git.wiki | 50 ++++++++++++++++++++++++++++++++++++++++++++++++-- 1 file changed, 48 insertions(+), 2 deletions(-) (limited to 'git.wiki') diff --git a/git.wiki b/git.wiki index d017103..5385d57 100644 --- a/git.wiki +++ b/git.wiki @@ -1,3 +1,49 @@ -- `git describe --tags ` Which tag is this commit after? -- `git describe --contains ` Which tag "contains" this commit +`git describe --tags ` :: Which tag is this commit after? +`git describe --contains ` :: Which tag "contains" this commit +`git describe --tags --match 'v[0-9].[0-9]*'` +:: If HEAD is on matching tag, show tag name, otherwise show +:: __-__-__ + +== Git hook "syntax" highlighting == +The output of git hooks are in some cases highlighted, see the +following examples (each directly echoed to stdout from a post-receive +hook) (the text after the term/colon doesn't matter) + +Color codes taken from my +[[https://github.com/HugoNikanor/dotfiles/blob/a82c4ef3a99d66009d888a8fb64c110b8b8990c6/config/alacritty/alacritty.yml|Alacritty Config]] + +=== Yellow === +- remote: {{#|hint|style="color:#de935f;"}}: small +- remote: {{#|Hint|style="color:#de935f;"}}: large +- remote: {{#|Hint|style="color:#de935f;"}} no color +- remote: {{#|hint|style="color:#de935f;"}} small +=== Bold Yellow === +- remote: {{#|warning|style="color:#f0c674;font-weight:bold;"}}: small +- remote: {{#|Warning|style="color:#f0c674;font-weight:bold;"}}: large +- remote: {{#|Warning|style="color:#f0c674;font-weight:bold;"}} no color +- remote: {{#|warning|style="color:#f0c674;font-weight:bold;"}} no color +=== Bold Green === +- remote: {{#|success|style="color:#b5bd68;font-weight:bold"}}: small +- remote: {{#|Success|style="color:#b5bd68;font-weight:bold"}}: large +- remote: {{#|Success|style="color:#b5bd68;font-weight:bold"}} no color +- remote: {{#|success|style="color:#b5bd68;font-weight:bold"}} no color +=== Bold Red === +- remote: {{#|error|style="color:#cc6666;font-weight:bold"}}: small +- remote: Error: large # This one apparently just doesn't +- remote: {{#|Error|style="color:#cc6666;font-weight:bold"}} no color +- remote: {{#|error|style="color:#cc6666;font-weight:bold"}} no color + += Multi git tools = +Tools for working on mutiple repostories at once + +== Multi-git-status == +`mgitstatus`, https://github.com/fboender/multi-git-status + + +Recurses the tree from current point, finds all repos, and tells their +status (needs commit, needs push, ...) +Has the binary `mgitstatus` + +Gita +https://github.com/nosarthur/gita -- cgit v1.2.3