feat!: switch from Vuepress to Vitepress
deploy / deploy (push) Successful in 4m45s

This commit is contained in:
2026-06-24 10:57:57 +02:00
parent 9903f5bed5
commit a46efb3e3f
45 changed files with 1691 additions and 10238 deletions
+7 -8
View File
@@ -2,7 +2,7 @@
#+title: Git
#+setupfile: headers
#+PROPERTY: header-args :exports code :tangle no
#+PROPERTY: header-args:conf-unix :mkdirp yes :tangle ~/.config/git/config :exports code :noweb yes
#+PROPERTY: header-args:conf-unix :mkdirp yes :tangle no :exports code :noweb yes
* Git
** Basic configuration
@@ -46,24 +46,23 @@ This is entirely a matter of personal preferences, but I like to use
*** Better Diffing
Gits diffing algorithm evolved and improved over time, but its
default algorithm did not. Take this example, from [[https://blog.gitbutler.com/how-git-core-devs-configure-git/][this Gitbutler
article]]:
default algorithm did not. Take this example, from [[https://blog.gitbutler.com/how-git-core-devs-configure-git/][this Gitbutler article]]:
[[file:./img/git/diff-default.png]]
#+html: <ImgFigure src="/img/git/diff-default.png">Default git diff output</ImgFigure>
Not really readable, I think youll agree. I mean, you can sort of see
what happens, but really, we just moved the =h2= styling below the
=.event= styling. Git seems to think otherwise. However, lets turn on
the =histogram= algorithm on:
[[file:./img/git/diff-histogram.png]]
#+html: <ImgFigure src="/img/git/diff-histogram.png">git diff output with histogram algorithm</ImgFigure>
Immediately, we have a much clearer picture of what happened! But Ill
let you on another secret: you can make it even clearer by using the
=colorMoved= option to color differently lines that were moved from
lines that were actually modified!
[[file:./img/git/diff-moved.png]]
#+html: <ImgFigure src="/img/git/diff-moved.png">git diff output with histogram algorithm and specific colours for moved blocks</ImgFigure>
Ill also add a configuration to make it easier to see what is being
compared using =mnemonicPrefix=. As per =man git-config=:
@@ -127,11 +126,11 @@ show you the conflicting incoming and HEAD changes, but it will also
show you what the code was before either modified the conflicting
area. Not a must-have feature, but a nice one to have. Compare this:
[[file:./img/git/merge-default.png]]
#+html: <ImgFigure src="/img/git/merge-default.png">Default appearance of a git conflict during a merge</ImgFigure>
To this:
[[file:./img/git/merge-zdiff3.png]]
#+html: <ImgFigure src="/img/git/merge-zdiff3.png">Same git conflict but with zdiff3</ImgFigure>
We have a new line beginning with =|||||||= with the original line
below. Also, its nice to see Emacs supports this syntax out of the