Learning git with "Try it!"s (and eev)
If you don't know what is eev, start by this page about eepitch.
My Emacs tutorial based on eev starts by explaining elisp hyperlinks.
(Everybody knows what are git and Emacs).
Announcements:
eev,
Emacs News.
Index:
1. Introduction
The animation below shows how to build a git repository with a certain structure step by step:
I took that structure from the manpage of gitrevisions; search for
"illustration, by Jon Loeliger"...
In the manpage it looks like this:
G H I J
\ / \ /
D E F
\ | / \
\ | / |
\|/ |
B C
\ /
\ /
A
And here is an eepitch block that builds a git repository with that structure:
• (eepitch-bash) • (eepitch-kill) • (eepitch-bash) rm -Rfv /tmp/eevgit-test1/ mkdir /tmp/eevgit-test1/ cd /tmp/eevgit-test1/ N=0 ++N () { N=$[$N+1]; echo $N; } Modify1 () { ++N >> $1; } Modify () { for i in $*; do Modify1 $i; done; } Commit () { git commit -a -m $1; } Branch () { git branch $*; } Checkout () { git checkout $*; } MergeOurs () { git merge -s ours $*; } git init Modify file1; git add file1 Commit A; Branch brAC Modify file1; Commit B; Branch brBDG; Checkout brAC Modify file1; Commit C; Checkout brBDG Modify file1; Commit D; Checkout HEAD^ -b brE Modify file1; Commit E; Checkout HEAD^ MergeOurs brAC -m F; Branch brFI; Checkout brBDG Modify file1; Commit G; Checkout HEAD^ -b brH Modify file1; Commit H; Checkout brFI Modify file1; Commit I; Checkout HEAD^ -b brJ Modify file1; Commit J # (find-gitk "/tmp/eevgit-test1/")
The `find-gitk' in the last line runs
"gitk --all --date-order /tmp/eevgit-repo-1/",
and displays the structure as:
2. The video
The video is here (on Youtube);
its subtitles are here.
If you have eev installed you can play a local
copy with (find-2024gitvideo).
I started to work on that video in dec/2023 but I only recorded it in 2024jan06.
The PDF that I used in the first two minutes of the video is
here.
3. The library and the intro
The video uses this library, eevgitlib1.sh,
and this intro: (find-git-intro).
