aboutsummaryrefslogtreecommitdiff
path: root/git.wiki
blob: 4b8c09cf87b1bddc822e94df9890c68a3ebeeefb (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61

`git describe --tags <commit>` :: Which tag is this commit after?
`git describe --contains <commit>` :: 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
:: _<tag name>_-_<commits since>_-_<short hash>_

== Merge base ==

{{{sh
git merge-base <commit> <commit>
}}}

Show the closest common ancestor of two commits.

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


= LFS =
https://git-lfs.com/