Warning: this is an htmlized version!
The original is here, and
the conversion rules are here.
######
#
# E-scripts on git.
#
# Note 1: use the eev command (defined in eev.el) and the
# ee alias (in my .zshrc) to execute parts of this file.
# Executing this file as a whole makes no sense.
# An introduction to eev can be found here:
#
#   (find-eev-quick-intro)
#   http://angg.twu.net/eev-intros/find-eev-quick-intro.html
#
# Note 2: be VERY careful and make sure you understand what
# you're doing.
#
# Note 3: If you use a shell other than zsh things like |&
# and the for loops may not work.
#
# Note 4: I always run as root.
#
# Note 5: some parts are too old and don't work anymore. Some
# never worked.
#
# Note 6: the definitions for the find-xxxfile commands are on my
# .emacs.
#
# Note 7: if you see a strange command check my .zshrc -- it may
# be defined there as a function or an alias.
#
# Note 8: the sections without dates are always older than the
# sections with dates.
#
# This file is at <http://angg.twu.net/e/git.e>
#           or at <http://angg.twu.net/e/git.e.html>.
#        See also <http://angg.twu.net/emacs.html>,
#                 <http://angg.twu.net/.emacs[.html]>,
#                 <http://angg.twu.net/.zshrc[.html]>,
#                 <http://angg.twu.net/escripts.html>,
#             and <http://angg.twu.net/>.
#
#######





# «.git-doc»				(to "git-doc")
# «.specifying»				(to "specifying")
# «.revisions»				(to "revisions")
# «.HEAD»				(to "HEAD")
# «.branches»				(to "branches")
# «.git-branch»				(to "git-branch")
# «.git-for-each-ref»			(to "git-for-each-ref")
# «.gitcore-tutorial»			(to "gitcore-tutorial")
# «.git-clone»				(to "git-clone")
# «.git-shallow-clone»			(to "git-shallow-clone")
# «.git-clone-recurse-submodules»	(to "git-clone-recurse-submodules")
# «.git-plumbing»			(to "git-plumbing")
# «.git-config»				(to "git-config")
# «.gitk»				(to "gitk")
# «.gitk-tkdiff»			(to "gitk-tkdiff")
# «.gitk-config»			(to "gitk-config")
# «.git-diff»				(to "git-diff")
# «.books»				(to "books")
# «.git-internals»			(to "git-internals")
# «.pro-git»				(to "pro-git")
# «.git»				(to "git")
# «.git.el»				(to "git.el")
# «.github-repo-create»			(to "github-repo-create")
# «.github-repo-setup»			(to "github-repo-setup")
# «.git-merge»				(to "git-merge")
# «.git-merge-s-ours»			(to "git-merge-s-ours")
# «.merge-strategies»			(to "merge-strategies")
# «.git-test»				(to "git-test")
# «.git-test-branch-merge»		(to "git-test-branch-merge")
# «.git-squash-commits»			(to "git-squash-commits")
# «.git-animations-intro»		(to "git-animations-intro")
# «.git-animations»			(to "git-animations")
# «.loeliger-animation»			(to "loeliger-animation")
# «.git-test-squash-commits»		(to "git-test-squash-commits")
# «.git-test-2»				(to "git-test-2")
# «.jonas»				(to "jonas")
# «.git-clean»				(to "git-clean")
# «.deltas»				(to "deltas")
# «.emacs-from-git»			(to "emacs-from-git")
# «.emacs-from-git-2019jan22»		(to "emacs-from-git-2019jan22")
# «.emacs-from-git-aug2019»		(to "emacs-from-git-aug2019")
# «.emacs-from-git-2020»		(to "emacs-from-git-2020")
# «.emacs31-from-git»			(to "emacs31-from-git")
# «.emacs30-from-git»			(to "emacs30-from-git")
# «.emacs29-from-git»			(to "emacs29-from-git")
# «.emacs283-from-git»			(to "emacs283-from-git")
# «.emacs282-from-git»			(to "emacs282-from-git")
# «.emacs27-from-git»			(to "emacs27-from-git")
# «.emacs26-from-git»			(to "emacs26-from-git")
# «.emacs25-from-git»			(to "emacs25-from-git")
# «.emacs24-from-git»			(to "emacs24-from-git")
# «.emacs-mirror»			(to "emacs-mirror")
# «.gitignore»				(to "gitignore")
# «.gitmagic»				(to "gitmagic")
# «.magit-2020»				(to "magit-2020")
# «.magit»				(to "magit")
# «.magit-deb-src»			(to "magit-deb-src")
# «.magit-from-git»			(to "magit-from-git")
# «.very-hard-reset»			(to "very-hard-reset")
# «.merge-different»			(to "merge-different")
# «.default-branch»			(to "default-branch")
# «.git-server»				(to "git-server")
# «.git-instaweb»			(to "git-instaweb")
# «.not-compressing»			(to "not-compressing")
# «.git-config-local»			(to "git-config-local")
# «.git-annex»				(to "git-annex")
# «.diags»				(to "diags")
# «.eev-branches»			(to "eev-branches")
# «.mtimes»				(to "mtimes")
# «.git-deb-src»			(to "git-deb-src")
# «.bare-repos»				(to "bare-repos")
# «.eev2-and-0.95.3-prototype»		(to "eev2-and-0.95.3-prototype")
# «.obsoletes-in-angg»			(to "obsoletes-in-angg")
# «.detached-head»			(to "detached-head")
# «.gitorious»				(to "gitorious")
# «.org-contribute»			(to "org-contribute")
# «.eev-git-repo-simple»		(to "eev-git-repo-simple")
# «.create-bare-and-push»		(to "create-bare-and-push")
# «.git-log»				(to "git-log")
# «.git-log-format»			(to "git-log-format")
# «.git-show-format»			(to "git-show-format")
# «.git-log-difftool»			(to "git-log-difftool")
# «.git-difftool»			(to "git-difftool")
# «.last-commit-message»		(to "last-commit-message")
# «.irc-channel»			(to "irc-channel")
# «.github-guides»			(to "github-guides")
# «.eev-verena»				(to "eev-verena")
# «.git-archive»			(to "git-archive")
# «.compare-eev-local-and-github»	(to "compare-eev-local-and-github")
# «.git-remote»				(to "git-remote")
# «.git-push»				(to "git-push")
# «.push.default»			(to "push.default")
# «.git-ls-files»			(to "git-ls-files")
# «.git-checkout»			(to "git-checkout")
# «.eev-UTF-8-branch»			(to "eev-UTF-8-branch")
# «.eev-fix-git-2018may31»		(to "eev-fix-git-2018may31")
# «.clone-into-non-empty-dir»		(to "clone-into-non-empty-dir")
# «.git-cat-file»			(to "git-cat-file")
# «.git-rev-parse»			(to "git-rev-parse")
# «.git-show»				(to "git-show")
# «.git-show-eev»			(to "git-show-eev")
# «.find-git-shows»			(to "find-git-shows")
# «.mergetool»				(to "mergetool")
# «.gitlab»				(to "gitlab")
# «.git-add»				(to "git-add")
# «.git-submodule»			(to "git-submodule")
# «.git-describe»			(to "git-describe")
# «.tracking»				(to "tracking")
# «.pull-request»			(to "pull-request")
# «.commit-long»			(to "commit-long")
# «.git-rebase»				(to "git-rebase")
# «.github-theme-minimal»		(to "github-theme-minimal")
# «.git-tag»				(to "git-tag")
# «.git-tag-eev-unibyte»		(to "git-tag-eev-unibyte")
# «.visual-merge»			(to "visual-merge")
# «.diffuse»				(to "diffuse")
# «.kdiff3»				(to "kdiff3")
# «.meld»				(to "meld")
# «.klg-cloning-local-repo»		(to "klg-cloning-local-repo")
# «.common-ancestor»			(to "common-ancestor")
# «.distance-between-commits»		(to "distance-between-commits")
# «.fast-forward»			(to "fast-forward")
# «.test-2020oct04»			(to "test-2020oct04")
# «.test-2020oct13»			(to "test-2020oct13")
# «.staging»				(to "staging")
# «.git-blame»				(to "git-blame")
# «.git-worktree»			(to "git-worktree")
# «.multiple-working-trees»		(to "multiple-working-trees")
# «.renaming-files»			(to "renaming-files")
# «.tracking-branches»			(to "tracking-branches")
# «.git-bottom-up»			(to "git-bottom-up")
# «.adding-collaborator»		(to "adding-collaborator")
# «.git-format-patch»			(to "git-format-patch")
# «.git-format-patch-2»			(to "git-format-patch-2")
# «.git-bisect»				(to "git-bisect")
# «.git-bisect-by-hand»			(to "git-bisect-by-hand")
# «.github-with-ssh»			(to "github-with-ssh")
# «.github-cli»				(to "github-cli")
# «.when-renamed»			(to "when-renamed")
# «.gollum-wiki»			(to "gollum-wiki")
# «.ugit»				(to "ugit")
# «.ccache»				(to "ccache")
# «.topics»				(to "topics")
# «.delete-repository»			(to "delete-repository")
# «.loeliger-tikz-1»			(to "loeliger-tikz-1")
# «.undo-commit»			(to "undo-commit")
# «.masscollabs»			(to "masscollabs")




# (find-zsh "installeddebs | sort | grep git")
# (find-zsh "availabledebs | sort | grep git")




#####
#
# Docs in the git-doc Debian package
# 2013feb10
#
#####

# «git-doc» (to ".git-doc")
# (find-status   "git-doc")
# (find-vldifile "git-doc.list")
# (find-udfile   "git-doc/")
# (find-udfile   "git-doc/technical/")
# (find-status   "git")
# (find-vldifile "git.list")
# (find-udfile   "git/")
# (find-status   "git-man")
# (find-vldifile "git-man.list")
# (find-udfile   "git-man/")

# file:///usr/share/doc/git-doc/user-manual.html
#         (find-udfile "git-doc/user-manual.txt")
#         (find-udfile "git-doc/")
# file:///usr/share/doc/git-doc/everyday.html
#         (find-udfile "git-doc/everyday.txt")
# file:///usr/share/doc/git-doc/index.html
# file:///usr/share/doc/git-doc/index.html

cd /tmp/
git
git help
# (find-sh "git help ls-files")
# (find-man "git-ls-files")
# (find-sh "locate ls-files")

# (find-gitdocgrep "grep --color -nH -e refs/head *.txt")





#####
#
# Specifying objects, revisions and ranges
# 2019feb09
#
#####

# «specifying» (to ".specifying")
# «revisions» (to ".revisions")
# (find-gitdocgrep "grep -nirH -e specify *")
# (find-gitdocgrep "grep --color -nH -e revisions *")
# (find-gitdocgrep "grep --color -nH -e 'SPECIFYING REVISIONS' *")
# (find-gitdocw3m "gitrevisions.html")
# (find-gitdocw3m "gitrevisions.html" "SPECIFYING REVISIONS")
# (find-eevfile ".git/")
# (find-eevfile ".git/logs/")
# (find-eevfile ".git/logs/refs/heads/master")
# (find-eevfile ".git/logs/refs/remotes/origin/master")
# (find-man "git-rev-parse")
# (find-gitdoc-links               "rev-parse")
# (find-gitdocfile             "git-rev-parse.txt")
# file:///usr/share/doc/git-doc/git-rev-parse.html

# (find-gitdocfile "")
# (find-gitdocfile "revisions.txt")
# (find-gitdocfile "revisions.txt" "SPECIFYING RANGES")
# (find-gitdocfile "revisions.txt" "illustration, by Jon Loeliger")
# (find-gitdocfile "revisions.txt" "'<sha1>'")
# (find-gitdocfile "revisions.txt" "'<describeOutput>'")
# (find-gitdocfile "revisions.txt" "'<refname>'")
# (find-man "7 gitrevisions")
# (find-man "7 gitrevisions" "$GIT_DIR/logs/<refname>")
# (find-man "7 gitrevisions" "^<n>")
# (find-man "7 gitrevisions" "<rev>~<n>")
# (find-man "7 gitrevisions" "<rev>~[<n>]")
# (find-man "7 gitrevisions" "The .. (two-dot) Range Notation")
# (find-man "7 gitrevisions" "<rev>:<path>")
# (find-man "7 gitrevisions" "illustration" "Loeliger")
# (find-man "7 gitrevisions" "Both commit nodes B and C are parents")

* (eepitch-shell)
* (eepitch-kill)
* (eepitch-shell)
# Preparation:
rm -Rfv /tmp/git-test/
mkdir   /tmp/git-test/
cd      /tmp/git-test/
git init

# (find-angg "bin/git-defs")
.           ~/bin/git-defs

Diagram
git checkout A
Modify a; Commit; git tag C
Diagram
git checkout B
Modify b; Commit; git tag D
git checkout B
Modify b; Commit; git tag E
git checkout B

Diagram

Modify b
Commit
git merge --no-edit C
git tag F
Diagram


# (find-gitk "/tmp/git/here/")

Modify a; Commit
Modify b; Commit
Diagram
Log1 HEAD
Log1 HEAD^
Log1 HEAD^^

Diagram
git checkout HEAD^
Diagram

# (find-man "git-show")

Diagram
Diagram 6ae58fb -1

Diagram HEAD   -1
Diagram HEAD^  -1
Diagram HEAD^1 -1
Diagram HEAD^^ -1

git checkout -1

git branch base
git branch idea
git checkout idea
Modify a; Commit
git checkout master
Modify b; Commit
git checkout idea
Modify a; Commit
git checkout master
Modify b; Commit
git checkout idea
git checkout master
git merge --no-edit idea
Diagram
Diagram -4
Dump




#####
#
# HEAD (and master)
# 2019apr11
#
#####

# «HEAD» (to ".HEAD")
# (find-gitdocfile "revisions.txt" "'HEAD',")
# (find-gitdocfile "revisions.txt" "'HEAD' names the commit")
# (find-gitdocfile "revisions.txt" "'master{tilde}3'")
# (find-fline "/tmp/eev-g/.git/")
# (find-fline "/tmp/eev-g/.git/HEAD")
# (find-fline "/tmp/eev-g/.git/refs/heads/")
# (find-fline "/tmp/eev-g/.git/refs/heads/UTF-8")
# (find-fline "/tmp/eev-g/.git/refs/heads/master")
# (find-books "__comp/__comp.el" "git-internals")
# (find-gitinternalspage 30 "called master")
# (find-gitinternalstext 30 "called master")




#####
#
# branches
# 2019apr11
#
#####

# «branches» (to ".branches")
# «git-branch»  (to ".git-branch")
# «git-for-each-ref»  (to ".git-for-each-ref")
# (find-man "1 git-branch")
# (find-man "1 git-branch" "-a, --all")
# (find-man "1 git-branch" "-v, -vv, --verbose")
# (find-man "1 git-for-each-ref")
# (find-books "__comp/__comp.el" "git-internals")
# (find-gitinternalspage 22 "A branch in Git is")
# (find-gitinternalstext 22 "A branch in Git is")
# (find-gitdoc-links               "branch")
# (find-gitdoc-links               "for-each-ref")

* (eepitch-shell)
* (eepitch-kill)
* (eepitch-shell)
cd /tmp/eev-g/
git branch --list -a
git for-each-ref
git for-each-ref | sort

# (find-gitdocgrep "grep --color -nH -e refs/head *.txt")
# (find-gitdocfile "gitcore-tutorial.txt" "ref: refs/heads/master")




#####
#
# gitcore-tutorial
# 2019oct06
#
#####

# «gitcore-tutorial» (to ".gitcore-tutorial")
# (find-gitdocfile "gitcore-tutorial.txt")

* (eepitch-shell)
* (eepitch-kill)
* (eepitch-shell)
export PAGER=cat

# (find-gitdocfile "gitcore-tutorial.txt" "Creating a Git repository")
rm -Rfv /tmp/git-tutorial/
mkdir   /tmp/git-tutorial/
cd      /tmp/git-tutorial/
git init

# (find-gitdocfile "gitcore-tutorial.txt" "Populating a Git repository")
# (find-man "1 git-update-index")
# (find-man "1 git-cat-file")
# (find-man "1 git-diff-files")
#
echo "Hello World"   > hello
echo "Silly example" > example
git update-index --add hello example
ls .git/objects/??/*
git cat-file -t   557db03de997c86a4a028e1ebd3a1ceb225be238
git cat-file blob 557db03de997

echo "It's a new day for git" >> hello
git diff-files
git diff-files -p
git diff

# (find-gitdocfile "gitcore-tutorial.txt" "Committing Git state")
# (find-man "1 git-write-tree")
#
git write-tree
tree=$(git write-tree)
commit=$(echo 'Initial commit' | git commit-tree $tree)
git update-ref HEAD $commit

# (find-gitdocfile "gitcore-tutorial.txt" "Making a change")
# (find-gitdocfile "gitcore-tutorial.txt" "Tagging a version")


# (find-gitk "/tmp/git-tutorial/")

# (find-gitdocfile "gitcore-tutorial.txt")





# (find-gitdocfile "gitcore-tutorial.txt" "ref: refs/heads/master")




#####
#
# git clone
# 2018mai30
#
#####

# «git-clone» (to ".git-clone")
# (find-gitdoc-links   "clone")
# (find-man      "1 git-clone")
# (find-man      "1 git-clone" "[<directory>]")
# (find-sh    "git help clone")
# (find-gitdocfile "git-clone.txt")
# (find-node "(tar)Option Summary" "`--strip-components=NUMBER'")

* (eepitch-shell)
* (eepitch-kill)
* (eepitch-shell)
rm -Rv /tmp/eev-g/
mkdir  /tmp/eev-g/
cd     /tmp/eev-g/
git clone https://github.com/edrx/eev.git .
git checkout UTF-8

# (find-fline "/tmp/eev-g/")
# (find-gitk  "/tmp/eev-g/")

function my-tkdiff-links   () { gsub.lua '.+' '(find-tkdiff "'$1'%1" "'$2'%1")'  }
function my-cmp            () { for i in $(cat); do echo $i; cmp $1$i $2$i; done }




#####
#
# Git: shallow clone
# 2012oct27
#
#####

# «git-shallow-clone» (to ".git-shallow-clone")
# http://stackoverflow.com/questions/6941889/is-git-clone-depth-1-shallow-clone-more-useful-than-it-makes-out
# (find-gitdoc-links "clone")
# (find-gitdoc-links "pull")
# (find-man "1 git-clone")
# (find-man "1 git-clone" "  --depth <depth>")
# (find-man "1 git-pull")
# (find-man "1 git-pull" "--depth=<depth>")



#####
#
# git-clone-recurse-submodules
# 2021jul25
#
#####

# «git-clone-recurse-submodules»  (to ".git-clone-recurse-submodules")
# (find-es "agda" "plfa-git-clone-recurse")
# (find-man "1 git-clone")
# (find-man "1 git-clone" "--recurse-submodules[=<pathspec]")




#####
#
# Git: plumbing
# 2011jan04
#
#####

# «git-plumbing»  (to ".git-plumbing")
# http://git-plumbing-preso.heroku.com/
# (find-man "1 git-write-tree")
# (find-man "1 git-update-index")
# (find-man "1 git-cat-file")
# (find-man "1 git-hash-object")
# (find-man "1 git-write-tree")
# (find-man "1 git-read-tree")
# (find-man "1 git-ls-files")
# (find-man "1 git-checkout-index")
# (find-man "1 git-log")

# (find-man "1 git-tag")



#####
#
# git-config
# 2011jan05 / 2013feb13
#
#####

# «git-config»  (to ".git-config")
# «git-config-local» (to ".git-config-local")
# http://www.kernel.org/pub/software/scm/git/docs/git-config.html
# (find-gitdoc-links "config")

* (eepitch-shell)
* (eepitch-kill)
* (eepitch-shell)
# (find-angg ".gitconfig")
# (find-man "1 git-config")
git config --global user.name "Eduardo Ochs"
git config --global user.email eduardoochs@gmail.com
cat ~/.gitconfig

# If the identity used for this commit is wrong, you can fix it with:
# git commit --amend --author='Your Name <you@example.com>'
# (find-man "1 git-commit" "--amend\n")
# (find-man "1 git-commit" "--author=<author>\n")

* (eepitch-shell)
* (eepitch-kill)
* (eepitch-shell)

# (find-fline "/tmp/foo/")
rm -Rfv /tmp/foo/
mkdir   /tmp/foo/
cd      /tmp/foo/
git init
git config user.name "Foo Bar"
# (find-fline "/tmp/foo/.git/config")
# (find-angg            ".gitconfig")
echo A > a
git add a
git commit -a -m 'Initial'
gitk &

# Bad news: git-config doesn't check for valid tags...
git config blitch.bletch "Plic Ploc"
# (find-fline "/tmp/foo/.git/config")
# But it can be used to extract 
git config blitch.bletch






#####
#
# gitk
# 2011jan04
#
#####

# «gitk»  (to ".gitk")
# (find-status   "git-gui")
# (find-vldifile "git-gui.list")
# (find-udfile   "git-gui/")
# (find-status   "gitk")
# (find-vldifile "gitk.list")
# (find-udfile   "gitk/")

# (find-gitdoc-links "citool")
# (find-gitdoc-links "gui")

# (find-man "1 gitk")
# (find-fline "/usr/bin/gitk")

# (find-man "1 git-log" "HEAD")
# http://lists.zerezo.com/git/msg648261.html

* (eepitch-shell)
* (eepitch-kill)
* (eepitch-shell)
rm -Rfv ~/usrc/luarocks-2.0.4/
tar -C ~/usrc/ -xvzf \
  $S/http/luarocks.org/releases/luarocks-2.0.4.tar.gz
cd     ~/usrc/luarocks-2.0.4/
git init
git ls-files
git add .
git ls-files
git commit -m "Initial commit"
git ls-files
git log | cat
gitk


* (eepitch-shell)
* (eepitch-kill)
* (eepitch-shell)
# (find-sh "cd ~/usrc/ && find * -type d | sort")
# (find-sh "cd ~/usrc/ && find * -type d | grep git | sort")
# (find-fline "~/usrc/lua-mode/.git")
cd ~/usrc/lua-mode/
gitk .




#####
#
# gitk with tkdiff
# 2013jan16
#
#####

# «gitk-tkdiff» (to ".gitk-tkdiff")
# (find-es "tcl" "tkdiff-deb-src")
# http://stackoverflow.com/questions/255202/how-do-i-view-git-diff-output-with-a-visual-diff-program
# https://stackoverflow.com/questions/255202/how-do-i-view-git-diff-output-with-my-preferred-diff-tool-viewer
# (find-esgrep "grep -niH -e tkdiff *.e")

# (find-gitdoc-links   "diff")
# (find-gitdoc-links   "difftool")
# (find-gitdoc-links   "config")

# (find-man "1 git-diff")
# (find-man "1 git-difftool")
# (find-man "1 git-difftool" "tkdiff")
# (find-man "1 git-config")
# (find-angg ".gitk")



#####
#
# gitk-config
# 2021jan05
#
#####

# «gitk-config»  (to ".gitk-config")
# (find-man "1 gitk" "$XDG_CONFIG_HOME/git/gitk")
# (find-fline "~/.config/git/gitk")




#####
#
# git-diff
# 2013jan27
#
#####

# «git-diff» (to ".git-diff")
# (find-udfile "git-doc/")
# (find-udfile "git-doc/" " diff")
# (find-udfile "git-doc/" " git-diff")
# (find-man "1 git-diff")
# (find-man "1 git-diff" "output line is formatted this way:")
# How can I extract two versions of a repo into a/ and b/,
# and then run a build in each, and compare the resulting binaries?

# (find-gitdoc-links   "diff")

# (find-man "1 git-checkout")
# (find-node "(magit)Diffing")

* (eepitch-shell)
* (eepitch-kill)
* (eepitch-shell)
* (eepitch-shell)
* (eepitch-kill)
* (eepitch-shell)
rm -Rfv /tmp/eev-g
mkdir   /tmp/eev-g/
cd      /tmp/eev-g/ && git clone https://github.com/edrx/eev.git .
cd      /tmp/eev-g/
git checkout UTF-8

export PAGER=CAT
git diff origin/unibyte



#####
#
# Books on Git
# 2019feb10
#
#####

# «books» (to ".books")
# (find-books "__comp/__comp.el" "git")
# https://www.reddit.com/r/git/comments/8vju18/can_you_recommend_a_nice_in_depth_book_on_git/
# (to "irc-channel")




#####
#
# Scott Chacon's "Git Internals" (Peepcode)
# 2019feb10
#
#####

# «git-internals» (to ".git-internals")
# (find-books "__comp/__comp.el" "git-internals")
# https://github.blog/2013-09-20-git-internals-pdf-open-sourced/
# https://github.com/pluralsight/git-internals-pdf/
# https://github.com/pluralsight/git-internals-pdf/releases
# https://github.com/pluralsight/git-internals-pdf/releases/download/v2.0/peepcode-git.pdf
# https://github.com/pluralsight/git-internals-pdf/archive/v2.0.tar.gz

* (eepitch-shell)
* (eepitch-kill)
* (eepitch-shell)
rm -Rv ~/usrc/git-internals-pdf-2.0/
tar -C ~/usrc/ -xvzf \
  $S/https/github.com/pluralsight/git-internals-pdf/archive/v2.0.tar.gz
cd     ~/usrc/git-internals-pdf-2.0/

# (code-c-d "gitinternals" "~/usrc/git-internals-pdf-2.0/")
# (find-gitinternalsfile "")
# (find-gitinternalsfile "code/")





#####
#
# Scott Chacon's "Pro Git" book
# 2013feb10
#
#####

# «pro-git» (to ".pro-git")
# (find-books "__comp/__comp.el" "git")
# (find-books "__comp/__comp.el" "git-progit")
# (find-books "__comp/__comp.el" "git-progit2")
# http://book.git-scm.com/
# http://git-scm.com/book
# https://git-scm.com/book/en/v2 2021oct27
# https://github.s3.amazonaws.com/media/progit.en.pdf

;; (find-fline "$S/https/github.s3.amazonaws.com/media/")
(code-xpdf     "progit" "$S/https/github.s3.amazonaws.com/media/progit.en.pdf")
(code-pdf-text "progit" "$S/https/github.s3.amazonaws.com/media/progit.en.pdf" 7)
;; (find-progitpage)
;; (find-progittext)
;; (find-progitpage (+ 7 43) "Git Branching")
;; (find-progittext (+ 7 43) "Git Branching")

# http://git-scm.com/book/en/Git-on-the-Server-The-Protocols
# http://git-scm.com/book/en/Git-Branching-What-a-Branch-Is





#####
#
# git
# 2010aug14
#
#####

# «git»  (to ".git")
# (find-books "__comp/__comp.el" "git")
# http://eagain.net/articles/git-for-computer-scientists/
# http://book.git-scm.com/
# https://git.wiki.kernel.org/index.php/GitDocumentation
# http://www.emacswiki.org/cgi-bin/wiki/Git

# (find-es "lua5" "luainspect")
# http://excess.org/article/2008/07/ogre-git-tutorial/
# http://git-scm.com/course/svn.html
# http://utsl.gen.nz/talks/git-svn/intro.html#getting
# http://www.kernel.org/pub/software/scm/git/docs/everyday.html
# http://www.kernel.org/pub/software/scm/git/docs/gittutorial.html
# http://www.spheredev.org/wiki/Git_for_the_lazy
# http://sysmonblog.co.uk/misc/git_by_example/

# (find-status   "git-core")
# (find-vldifile "git-core.list")
# (find-udfile   "git-core/")
# (find-status   "git-doc")
# (find-vldifile "git-doc.list")
# (find-udfile   "git-doc/")
# (find-udfile   "git-doc/git-checkout.txt" "git checkout master")


* (eepitch-shell)
* (eepitch-kill)
* (eepitch-shell)
rm -Rfv ~/usrc/luarocks-2.0.4/
tar -C ~/usrc/ -xvzf \
  $S/http/luarocks.org/releases/luarocks-2.0.4.tar.gz
cd     ~/usrc/luarocks-2.0.4/

git init && git add . && git commit -m "Initial commit"

cd     ~/usrc/luarocks-2.0.4/
./configure
./configure --help
./configure \
  --with-lua=$LUA51SRC \
  --prefix=$HOME/usrc/luarocks
make         |& tee om
make install |& tee omi

git commit -a -m "After make and make install"

patch -p0 src/luarocks/build.lua <<'%%%'
100a101
>    print("[At: build_rockspec]")
%%%

git commit -a -m "Trivial test patch"
gitk
git diff --patch master@{1} | cat
# git diff --patch "After make and make install" | cat




#####
#
# git.el
# 2011feb04
#
#####

# «git.el»  (to ".git.el")
# (find-sh "locate git.el")
# (find-efile "vc-git.el")
# (find-udfile "git/contrib/emacs/")
# (find-udfile "git/contrib/emacs/git.el")
# (find-udfile "git/contrib/emacs/git.el" "Wrappers for basic git commands")
# (find-udfile "git/contrib/emacs/README")
# (find-node "(pcl-cvs)Top")
# (find-fline "~/usrc/ditaa/")

(add-to-list 'load-path "/usr/share/doc/git/contrib/emacs/")
(require 'git)





#####
#
# Githug reposity: creating
# 2011nov27
#
#####

# «github-repo-create»  (to ".github-repo-create")
# «github-repo-setup»  (to ".github-repo-setup")
# http://peekaboo.github.com/

# (find-gitdoc-links   "symbolic-ref")

Instructions for setting up username.github.com *
  Create a repo named username.github.com
  Push a `master` branch to GitHub and enjoy!
Instructions for setting up username.github.com/repo-name *
  cd /path/to/repo-name
  git symbolic-ref HEAD refs/heads/gh-pages
  rm .git/index
  git clean -fdx
  echo "My GitHub Page" > index.html
  git add .
  git commit -a -m "First pages commit"
  git push origin gh-pages
Caution: make your working directory clean before you do this (either
stash or commit), otherwise this will lose any changes you've made to
your project since the last commit.

# (find-man "git-symbolic-ref")





#####
#
# git-merge
# 2019apr10
#
#####

# «git-merge» (to ".git-merge")
# (find-man "1 git-merge")
# (find-man "1 git-merge" "--no-edit")
# (find-man "1 git-mergetool")
# (find-es "git" "git-animations")
# https://emacs.stackexchange.com/questions/16469/how-to-merge-git-conflicts-in-emacs
# https://www.reddit.com/r/emacs/comments/4j4rle/i_figure_it_out_how_to_use_emacsclient_as_gits/
# https://help.github.com/en/articles/resolving-a-merge-conflict-using-the-command-line
# (find-books "__comp/__comp.el" "git-progit2")
# (find-progit2page (+ 6 71) "Basic Branching and Merging")
# (find-progit2text (+ 6 71) "Basic Branching and Merging")
# (find-progit2page (+ 5 73) "merge commit")
# (find-progit2text (+ 5 73) "merge commit")

* (eepitch-shell)
* (eepitch-kill)
* (eepitch-shell)
rm -Rfv /tmp/eev-g
mkdir   /tmp/eev-g/
cd      /tmp/eev-g/ && git clone https://github.com/edrx/eev.git .
cd      /tmp/eev-g/
git checkout UTF-8

git merge --no-edit origin/unibyte
git status

git merge origin/unibyte
git status
git mergetool
git mergetool --tool-help
git mergetool --tool=tkdiff
git mergetool --tool=emerge
git mergetool --tool=meld

# (find-fline "/tmp/eev-g/")
# (find-gitk "/tmp/eev-g/")

# (find-es "tcl" "tkdiff")
# (find-es "emacs" "merge")


* (eepitch-shell)
* (eepitch-kill)
* (eepitch-shell)

# Can I use git-merge to make the eev repo point to the utf-8 branch?
# Stefan Monnier gave me this hint in 2019mar15...
# https://mail.google.com/mail/ca/u/0/#inbox/QgrcJHshbMQhlqMWtLSdBzQzdbnhBGwxVnb

   >    I know less git that I should, and by the way
   >    - important caveat! - all the new developments are being pushed to
   >    the "UTF-8" branch of the git repository, but the "master" there
   >    still points to an obsolete branch and I don't know how to fix
   >    that... =(

   Not sure what "fix" you're thinking of, but I'd think that

       git checkout master

   followed by

       git merge origin/UTF-8

   might be a start?




#####
#
# git merge -s ours
# 2019oct08
#
#####

# «git-merge-s-ours» (to ".git-merge-s-ours")
# (find-gitdocfile "merge-strategies.txt")
# (find-gitdocfile "merge-strategies.txt" "ours::")

* (eepitch-shell)
* (eepitch-kill)
* (eepitch-shell)
mkdir ~/bin/
rm -v ~/bin/git-defs
cd    ~/bin/
wget http://angg.twu.net/bin/git-defs
# (find-fline "~/bin/git-defs")

* (eepitch-shell)
* (eepitch-kill)
* (eepitch-shell)
. ~/bin/git-defs         # (find-angg "bin/git-defs")
rm -Rf   /tmp/git/here/
mkdir -p /tmp/git/here/
cd       /tmp/git/here/
git init
Modify a; git add a; Commit A
Diagram
Modify a; Commit B
Diagram
Log1 HEAD
Log1 HEAD^
git checkout HEAD^
Modify a; Commit C
Diagram
git merge -s ours -m D master
Diagram
Log1 HEAD^
Log1 HEAD^1
Log1 HEAD^2
git show HEAD:a
git show HEAD^1:a
git show HEAD^2:a

git merge --no-edit C
git merge -s ours D

# (find-man "git-merge")
# (find-man "1 git-merge" "built-in list of strategies")




#####
#
# merge-strategies
# 2019oct08
#
#####

# «merge-strategies» (to ".merge-strategies")
# (find-gitdocfile "merge-strategies.txt")
# https://www.atlassian.com/git/tutorials/using-branches/merge-strategy




#####
#
# Git test (for a tutorial?)
# 2012nov24
#
#####

# «git-test» (to ".git-test")
# (find-es "cvs" "bzr-test")
# (code-c-d "gittest" "/tmp/git-test/")
# (find-gittestfile "")
# (defun eejump-9 () (find-gittestsh0 "gitk"))

* (eepitch-shell)
* (eepitch-kill)
* (eepitch-shell)
N=0
  N () { echo $N; }
++N () { N=$[$N+1]; echo $N; }
Dump1   () { echo $1 \($(cat $1)\); }
Dumps   () { for i in $*; do Dump1 $i; done; }
Dump    () { Dumps $(find * -type f | sort); }
Modify1 () { ++N >> $1; Dump1 $1; }
Modify  () { for i in $*; do Modify1 $i; done; }

rm -Rfv /tmp/git-test/
mkdir   /tmp/git-test/
cd      /tmp/git-test/
# (find-fline "/tmp/git-test/")
mkdir d
N=0
Modify a b d/c d/d
Modify a
Dump

git init
git add -n -v .
git add .
# (find-gittestsh0 "gitk")

git ls-files
git commit -m Initial
# (find-gittestsh0 "gitk")

Modify a
git commit --dry-run
git commit --dry-run -m 'Rev 6'

git ls-files
git add -n -v .
git commit --dry-run -m 'Rev 6'
git commit           -m 'Rev 6'
# (find-gittestsh0 "gitk")
git commit        -a -m 'Rev 6'
# (find-gittestsh0 "gitk")
git commit        -a -m 'Rev 7'
# (find-gittestsh0 "gitk")
Modify b
git commit        -a -m 'Rev 7'
# (find-gittestsh0 "gitk")

# (find-fline "/tmp/git-test/")

# (find-man "1 git-add")
# (find-man "1 git-add" "-n, --dry-run")

# (find-man "tee")




#####
#
# git test: branch and merge
# 2013sep03
#
#####

# «git-test-branch-merge» (to ".git-test-branch-merge")
# (find-angg ".emacs" "pro-git")
# (find-progitpage (+ 7 48) "3.2 Basic Branching and Merging")
# (find-progittext (+ 7 48) "3.2 Basic Branching and Merging")
# (find-progitpage (+ 7 63) "3.6 Rebasing")
# (find-progittext (+ 7 63) "3.6 Rebasing")
# (find-progitpage (+ 7 147) "6.4.4 Squashing a Commit")
# (find-progittext (+ 7 147) "6.4.4 Squashing a Commit")
# (find-udfile "git-doc/git-checkout.txt")
# (find-udfile "git-doc/git-rebase.txt")
# (find-udfile "git-doc/git-merge.txt")
# (find-man "1 git-checkout")
# (find-man "1 git-rebase")
# (find-man "1 git-merge")
# (find-man "1 git-merge" "--squash")

* (eepitch-shell)
* (eepitch-kill)
* (eepitch-shell)
# (find-angg "bin/git-defs")
. ~/bin/git-defs

rm -Rf   /tmp/git/here/
mkdir -p /tmp/git/here/
cd       /tmp/git/here/
git init

Modify a b
git add a b
Commit
Modify a b
Commit
Diagram

git branch base

git branch idea
* (D)
git checkout idea;   Modify a; Commit
git checkout master; Modify b; Commit
git checkout idea;   Modify a; Commit
* (D)
Diagram
Dump
git checkout master; Modify b; Commit
Diagram
Dump

git merge --no-edit idea
Diagram
Dump

# (find-gitk "/tmp/git/here/")




#####
#
# Squashing commits
# 2013sep04
#
#####

# «git-squash-commits» (to ".git-squash-commits")
# <edrx> ok, so I just learned how to use "git rebase -i <branch>"...
#        but how can I do something equivalent to that
#        non-interactively when I am absolutely sure that all the
#        commits since "<branch>" are to be squashed, and when I want
#        the message for that new commit - the one that synthesizes
#        all the ones I'm squashing - to be "foo bar"?
# <moritz> edrx: there's a git merge --squash; not sure if it does
#          what you want though
# <edrx> moritz: thanks - I just found a chapter about squashing in
#        the Pro Git book, btw... reading
# <jast> edrx: if you want to squash absolutely all commits since
#        then, you can do this (assuming there are no uncommitted
#        changes): git reset --soft <branch>; git commit
# <edrx> jast: trying
# <edrx> jast: brilliant, thanks =)

# (find-man "git-reset" "  --soft")
# (find-man "git-checkout" "If -b is given")

* (eepitch-shell)
* (eepitch-kill)
* (eepitch-shell)
# (find-angg "bin/git-defs")
. ~/bin/git-defs

rm -Rf   /tmp/git/here/
mkdir -p /tmp/git/here/
cd       /tmp/git/here/
git init

Modify a b; git add a b; Commit
Modify a b; Commit
git branch base
git branch idea
git checkout idea;   Modify a; Commit
git checkout master; Modify b; Commit
git checkout idea;   Modify a; Commit
git checkout master; Modify b; Commit
git merge --no-edit idea
git branch slow
Diagram
Dump

git reset --soft base
git checkout -b new
git commit -a -m '5 6 7 8'
Diagram
Dump

Dump; echo; Diagram


# (find-gitk "/tmp/git/here/")





#####
#
# Git animations - a video
# 2013nov24
#
#####

# «git-animations-intro» (to ".git-animations-intro")


Git animations
==============
We will use eev - in particular eepitch and find-wset - to show what
happens when we do branches and merges in Git. Our window setting will
be this:

   _______________________________________________________
  |                |                                      |
  |                |                 shell                |
  |                |                                      |
  |    e-script    |______________________________________|
  |                |                    |                 |
  |                |  diagram "before"  |  diagram "now"  |
  |                |   (at time t-1)    |   (at time t)   |
  |________________|____________________|_________________|

The commands in a pre-prepared e-script will be sent to a shell by
eepitch (when we type <f8>) and executed. When we type <f8> at a line
that starts with a red star the line is executed as Lisp instead of
being sent to a shell, and the lines like

  * (D)

update the two diagrams: the last diagram is moved to a buffer called
"*old dump/diagram*", and a diagram showing the current state of both
the "working directory" and the "git directory" is produced and put at
the buffer "*dump/diagram*".

The directories that we will use are:

  /tmp/git/here/      - the "working directory"
  /tmp/git/here/.git/ - the "git directory"

and the "Modify" command the we will use to change files in the
working directory just updates a counter and adds numbers to the end
of the files whose names are given as its arguments. The numbers
appear in separate lines in the files, but the "Dump" command shows
each file in the working directory in a single line. The "* (D)" lines
run the shell functions "Dump" and "Diagram", where "Diagram" runs
this:

  git log --oneline --graph --decorate --all --date-order






shell


diagram "before"    diagram "now"
 (at time t-1)       (at time t)








which are
described here,

  http://










#####
#
# git animations (for a possible video)
# 2013sep07
#
#####

# «git-animations» (to ".git-animations")
# (find-angg ".emacs" "find-gitdiag")
# (find-angg "bin/git-defs")
* (defun d () (interactive) (find-gitddiag    "/tmp/git/here/"))
* (defun D () (interactive) (find-gitddiag-4a "/tmp/git/here/"))

* (eek "C-x 1") (ee-kill-buffer "*dump/diagram*")
* (eepitch-shell)
* (eepitch-kill)
* (eepitch-shell)
# (find-angg "bin/git-defs")
. ~/bin/git-defs

rm -Rf   /tmp/git/here/
mkdir -p /tmp/git/here/
cd       /tmp/git/here/
git init
Modify a b; git add a b; Commit
* (D)
Modify a b; Commit
* (D)
git branch base
* (D)
git branch idea
* (D)
git checkout idea
* (D)
Modify a; Commit
* (D)
# (find-gitk "/tmp/git/here/")

git checkout master
* (D)
Modify b; Commit
* (D)
git checkout idea
* (D)
Modify a; Commit
* (D)
git checkout master
* (D)
Modify b; Commit
* (D)
# (find-gitk "/tmp/git/here/")

git checkout idea
* (D)
git checkout master
* (D)

git merge --no-edit idea
Diagram
Dump
* (D)
# (find-gitk "/tmp/git/here/")

git branch slow
* (D)
git reset --soft base
* (D)
git checkout -b fast
* (D)
git commit -a -m '5 6 7 8'
* (D)


** Delete the slow branch
git branch -D idea
* (D)
git branch -D slow
* (D)
git branch -D base
* (D)

git branch

# (find-man "git-branch")
Diagram
Dump

Dump; echo; Diagram


# (find-gitk "/tmp/git/here/")




#####
#
# loeliger-animation
# 2023dec30
#
#####

# «loeliger-animation»  (to ".loeliger-animation")
# (find-angg "bin/eevgitlib1.sh" "MakeTree1")
# (find-efunction 'find-gitddiag-4a)

* (defun D (&rest r) (interactive) (find-gitddiag-4a "/tmp/eevgit-test1/"))
* (eepitch-shell)
* (eepitch-kill)
* (eepitch-shell)
rm -Rfv /tmp/eevgit-test1/
mkdir   /tmp/eevgit-test1/
cd      /tmp/eevgit-test1/
. ~/bin/eevgitlib1.sh

git init
Modify file1
              Modify file2
                           git add file1 file2
* (D)
              Commit A
* (D "A1")
                        Branch brAC
* (D "A1.5")
Modify file1
* (D)
              Commit B
* (D "B1")
                        Branch brBDG
* (D "B1.5")
                                      Checkout brAC
* (D)
Modify file1
* (D)
              Commit C
* (D "C1")
                                      Checkout brBDG
* (D)
Modify file1
* (D)
              Commit D
* (D)
                                      Checkout HEAD^ -b brE
* (D)
Modify file1
* (D)
              Commit E
* (D)
                                      Checkout HEAD^
* (D)
   MergeOurs brAC -m F
* (D)
                        Branch brFI
* (D)
                                      Checkout brBDG
* (D)
Modify file1
* (D)
              Commit G
* (D)
                                      Checkout HEAD^ -b brH
* (D)
Modify file1
* (D)
              Commit H
* (D)
                                      Checkout brFI
* (D)
Modify file1
* (D)
              Commit I
* (D)
                                      Checkout HEAD^ -b brJ
* (D)
Modify file1
* (D)
              Commit J
* (D)


MakeTree1
Diagram







# «git-test-squash-commits» (to ".git-test-squash-commits")

git branch -d idea
git checkout base
git branch new
git checkout new
git merge --squash master
Dump
Diagram
git commit -a -m '5 6 7 8'
Diagram

git checkout master
git reset --soft base
git branch   new2
git checkout new2
git commit -a -m '5 6 7 8'
Dump
Diagram



git branch new
git merge --squash

# http://sethrobertson.github.io/GitBestPractices/#sausage
# http://sethrobertson.github.io/GitPostProduction/gpp.html

git rebase base
Diagram
export EDITOR=$HOME/bigsrc/emacs/lib-src/emacsclient
git rebase -i base
Diagram
Dump



# (find-man "1 git-merge")
# (find-man "1 git-merge" "\nMERGE STRATEGIES")
# (find-man "1 git-rebase")
# (find-man "1 git-rebase" "-i, --interactive")

# (find-gitk "/tmp/git/here/")

rm -fr /tmp/git/here/.git/rebase-merge





#####
#
# git test (2)
#
#####

# «git-test-2» (to ".git-test-2")
# (find-angg ".zshrc" "git-test")
# (find-man "1 git-reset")
# (find-man "1 git-branch")

* (eepitch-shell)
* (eepitch-kill)
* (eepitch-shell)
# (find-angg "bin/git-defs")
. ~/bin/git-defs

rm -Rf   /tmp/git/remote/
mkdir -p /tmp/git/remote/
cd       /tmp/git/remote/
git init --bare

rm -Rf   /tmp/git/here/
mkdir -p /tmp/git/here/
cd       /tmp/git/here/
git clone /tmp/git/remote/ .

Modify a b
git add a b
Commit
git push origin master
Modify a b
Commit
Diagram

git push origin master

git branch idea
Modify a b; Commit
Modify a b; Commit
git checkout master
Diagram

# (find-gitk "/tmp/git/here/")
# (find-gitk "/tmp/git/remote/")
git push
N


rm -Rf /tmp/here/
mkdir  /tmp/here/
cd     /tmp/here/
git clone /tmp/public/ .
echo 1 > VERSION
echo 2 > otherfile
git add VERSION otherfile
git commit -a -m 'Created a git repository'
git push origin master

git branch idea
git checkout idea
Diagram
Modify a b; Commit
Diagram

git checkout master
Diagram
Modify a b; Commit
Diagram

git checkout idea
Diagram


# This:
#   git clone /tmp/git/remote/ .
# is equivalent to:
#   git init
#   git remote add origin /tmp/git/remote/
# Check with:
#   git remote -v







#####
#
# Jonas's hints
# 2012oct31
#
#####

# «jonas» (to ".jonas")
# (find-man "1 git-clone")
# (find-man "1 git-clone" "  --bare")
# (find-man "1 git-init")
# (find-man "1 git-remote")
# (find-man "1 git-commit")
# (find-man "1 git-tag")
# (find-man "1 git-push")
# (find-man "1 git-branch")
# (find-man "1 git-checkout")
# (find-man "1 git-add")
# (find-man "1 git-rm")
# (find-man "1 git-ls-files")
# (find-man "1 git-merge")

You should branch earlier as (I think) you plan to do:

tar -xf eev-current.tar
# possibly rename directory, and make sure there is no unnecessary nesting
cd eev
git init
git remote add origin git@github.com:you/eev.git
git add .
git commit -m "initial import of version xy"
git tag 0.95.1
git push origin master --tags

git branch next
git checkout next
rm * # but make sure you don't remove .git
tar -xf eev-work-in-progress.tar
# again possibly rename directory...
git add .
git rm $(git ls-files --deleted-files)
git commit -m "import work in progress"

... hack commit hack commit ...

git checkout master
git merge next
git tag 0.95.2
git push origin master --tags

* and then to fix bugs in the stable branch

git checkout master

* resp. to work on new features

git checkout next   # or better
git checkout feature/SOMEFEATURE

Hope that helps a bit,
Jonas




#####
#
# git-clean
# 2012nov18
#
#####

# «git-clean» (to ".git-clean")
# (find-man "1 git-clean")
# (find-man "1 git-clean" "  -d")
# (find-man "1 git-clean" "  -f")
# (find-man "1 git-clean" "  -x")
# (find-man "1 git-clone")
# (find-man "1 git-fetch")
# (find-man "1 git-merge")
# (find-man "1 git-pull")
# (find-man "1 git-reset")
# (find-man "1 git-reset" "  --hard")
# (find-man "1 git-reset" "worktree")

# http://sethrobertson.github.com/
# http://sethrobertson.github.com/GitFixUm/
# http://sethrobertson.github.com/GitFixUm/fixup.html
# (find-fline "~/LOGS/2012nov18.git")

# http://wiki.nosdigitais.teia.org.br/IRC_DEV

* (eepitch-shell)
* (eepitch-kill)
* (eepitch-shell)
rm -Rfv /tmp/lalenia0/
mkdir   /tmp/lalenia0/
rm -Rfv /tmp/lalenia/
mkdir   /tmp/lalenia/
ln -s ../lalenia0/.git /tmp/lalenia/.git
cd      /tmp/lalenia/
laf
cd     /tmp/
git clone git://labmacambira.git.sourceforge.net/gitroot/labmacambira/lalenia
# fatal: destination path 'lalenia' already exists and is not an empty directory.

* (eepitch-shell)
* (eepitch-kill)
* (eepitch-shell)
rm -Rfv /tmp/lalenia*





cd ~/usrc/
mkdir gits/

mkdir lalenia0/
mv -iv lalenia/.git lalenia0/

mkdir  lalenia/
mv -v /tmp/lalenia/.git lalenia/
mkdir lalenia0/
mv -ivt lalenia/.git lalenia0/

# (find-man "mv")



* (eepitch-shell)
* (eepitch-kill)
* (eepitch-shell)
rm -Rv /tmp/lalenia/
mkdir  /tmp/lalenia/
cd     /tmp/
git clone --depth 1 \
  git://labmacambira.git.sourceforge.net/gitroot/labmacambira/lalenia
cd     /tmp/lalenia/
laf
date > MESS
laf
git clean -dfx
echo FOOOOOOOOO >> README.txt
git reset --hard
git pull
rm -Rv /tmp/lalenia/conf/
rm -Rv /tmp/lalenia/plugins/
git checkout

# (find-fline "/tmp/lalenia/")
# (find-man "1 git-clean")

<SethRobertson> cd directory; git clean -dfx; git reset --hard; git
                pull
<SethRobertson> Note this will destroy all uncommitted changes.  If
                you want to destroy committed changes I can provide
                an updated script





#####
#
# Deltas
# 2012dec01
#
#####

# «deltas» (to ".deltas")
# (find-angg ".emacs" "git")
# (find-gitinternalstext  93 "delta-compressed")
# (find-man "1 git-gc")

/home/edrx/bigsrc/git(edrx:va)# git clone --depth=1 git://git.sv.gnu.org/emacs
Cloning into emacs...
remote: Counting objects: 90110, done.        
remote: Compressing objects: 100% (39511/39511), done.        
remote: Total 90110 (delta 81670), reused 55997 (delta 50071)        
Receiving objects: 100% (90110/90110), 176.65 MiB | 93 KiB/s, done.
Resolving deltas: 100% (81670/81670), done.
/home/edrx/bigsrc/git(edrx:va)# 




#####
#
# Emacs from git
# 2012nov07
#
#####

# «emacs-from-git» (to ".emacs-from-git")
# (find-angg "emacs-lua/tests.e" "clone-emacs-repo")
# (find-es "cvs" "emacs-from-bzr")
# (find-es "emacs" "emacs-from-git")
# http://emacswiki.org/emacs/EmacsFromGit
# https://lars.ingebrigtsen.no/2014/11/13/welcome-new-emacs-developers/
# http://www.cyber.com.au/~twb/.bin/twb-get

# https://lists.gnu.org/archive/html/emacs-devel/2022-11/msg01380.html
# https://git.savannah.gnu.org/cgit/emacs.git/tree/CONTRIBUTE
# (find-gitemacsfile "CONTRIBUTE")
# (find-gitemacsfile "INSTALL")
# (find-gitemacsfile "INSTALL.REPO")

# (find-man "1 git-clone")
# (find-man "1 git-clone" "  --bare")

* (eepitch-shell)
* (eepitch-kill)
* (eepitch-shell)
# (find-fline "~/bigsrc/")
# (find-fline "~/bigsrc/emacs/")
rm -Rfv  ~/bigsrc/emacs/
mkdir -p ~/bigsrc/emacs/
cd       ~/bigsrc/
# git clone --depth=1 git://git.sv.gnu.org/emacs
git   clone           git://git.sv.gnu.org/emacs
cd       ~/bigsrc/emacs/

* (eepitch-shell)
* (eepitch-kill)
* (eepitch-shell)
cd       ~/bigsrc/emacs/
git reset
git pull
./autogen.sh  |& tee oa
./configure   |& tee oc
make          |& tee om

# (find-man "make")
make -n install   |& tee omni
sudo make install |& tee omi
# (find-fline "/usr/local/")
# (find-fline "/usr/local/bin/")
# (find-fline "/usr/local/include/")
# (find-fline "/usr/local/lib/")
# (find-fline "/usr/local/libexec/emacs/27.0.50/x86_64-pc-linux-gnu/")
# (find-fline "/usr/local/share/")

# (find-gitemacsfile "")
# (find-gitemacsfile "src/")
# (find-gitemacssh "find * | sort")
# (find-gitemacssh "find * | sort | grep emacs")

* (eepitch-shell)
* (eepitch-kill)
* (eepitch-shell)
# (find-angg ".zshrc" "ae")
~/bigsrc/emacs/src/emacs
~/bigsrc/emacs/src/emacs -fn fixed
~/bigsrc/emacs/src/emacs -fn 6x13
~/bigsrc/emacs/src/emacs -fn 6x13 -fg bisque -bg black







#####
#
# Emacs from git: bug report for a compilation error
# 2019jan22
#
#####

# «emacs-from-git-2019jan22» (to ".emacs-from-git-2019jan22")
# (find-es "emacs" "bug-gnu-emacs")

Hi list,

I'm trying to build emacs from git here - "here" means a Trisquel,
i.e., Debian-ish box - with these commands,

  sudo apt-get update
  sudo apt-get upgrade
  sudo apt-get build-dep emacs24

  rm -Rfv  ~/bigsrc/emacs/
  mkdir -p ~/bigsrc/emacs/
  cd       ~/bigsrc/
  git clone --depth=1 git://git.sv.gnu.org/emacs
  cd       ~/bigsrc/emacs/
  ./autogen.sh  2>&1 | tee oa
  ./configure   2>&1 | tee oc
  make          2>&1 | tee om

  installeddebs | sort | tee oinstalleddebs
  tar -cvzf /tmp/emacs-git-make-fails-bug-logs.tgz oa oc om oinstalleddebs

and "make" is failing when it tries to compile src/alloc.c... the
error is:

  alloc.o: In function `malloc_initialize_hook':
  /home/edrx/bigsrc/emacs/src/alloc.c:140: undefined reference to `my_heap_start'

I am attaching the logs of "./autogen.sh", "./configure", "make", and
of a script called "installeddebs" that lists all the installed
.debs with their versions.





autoconf

./configure |& tee oc

# (code-c-d "gitemacs" "~/bigsrc/emacs/")
# (find-gitemacsfile "")
# (find-gitemacsfile "INSTALL.REPO")
# (find-gitemacsfile "INSTALL" "./configure")
# (find-gitk "~/bigsrc/emacs/")

* (eepitch-shell)
* (eepitch-kill)
* (eepitch-shell)
# Reset the working directory from the .git/ directory.
# This is MUCH stronger than a "make clean".
# (find-man "1 git-reset")
# (find-man "1 git-pull")
#
cd   ~/bigsrc/emacs/
find ~/bigsrc/emacs/ -maxdepth 1 -mindepth 1 | sort
find ~/bigsrc/emacs/ -maxdepth 1 -mindepth 1 | sort | grep -v '/\.git$'
rm -Rv $(
find ~/bigsrc/emacs/ -maxdepth 1 -mindepth 1 | sort | grep -v '/\.git$'
)
git pull

git clean -dfx
git reset --hard

* (eepitch-shell2)
* (eepitch-kill)
* (eepitch-shell2)
cd ~/bigsrc/emacs/
./autogen.sh     |& tee oag
# (or you can just run `autoreconf -i -I m4').
./configure      |& tee oc
make bootstrap   |& tee omb

* (eepitch-shell2)
* (eepitch-kill)
* (eepitch-shell2)
# (find-man "1 git-pull")
cd ~/bigsrc/emacs/
git pull --depth=1 |& tee ogp
make               |& tee om

gitk &



* (eepitch-shell)
* (eepitch-kill)
* (eepitch-shell)
apt-get build-dep emacs
R
apt-get install libxpm-dev libjpeg-dev libxml2-dev

# 2013aug30:
# (setq ee-git-dir "~/bigsrc/")
# (find-git-links "git://git.sv.gnu.org/emacs" "emacs")
# rm -Rfv ~/bigsrc/emacs/
cd      ~/bigsrc/
git clone --depth 1 git://git.sv.gnu.org/emacs
cd      ~/bigsrc/emacs/

cd ~/bigsrc/emacs/
./autogen.sh     |& tee oag
# (or you can just run `autoreconf -i -I m4').
./configure      |& tee oc
make bootstrap   |& tee omb

# (find-sh0 "rm -v ~/bin/emacs24")
# (find-sh0 "cd ~/bin/ && cp -s ../bigsrc/emacs/src/emacs emacs24")

# (code-c-d "gitemacs" "~/bigsrc/git/emacs/")
# (code-c-d "gitemacs" "~/bigsrc/emacs/")
# (find-gitemacsfile "")
# (find-gitemacssh "find | sort")
# (find-gitemacssh "du -c")

# (find-gitemacsfile "INSTALL.BZR")
# (find-gitemacsfile "INSTALL.BZR" "configure.ac")
# (find-gitemacsfile "configure.ac" "AC_PREREQ")
# (find-gitemacsfile "configure.ac" "AM_INIT_AUTOMAKE")
# (find-status "autoconf")
# (find-status "automake")




#####
#
# emacs-from-git-aug2019
# 2019aug29
#
#####

# «emacs-from-git-aug2019» (to ".emacs-from-git-aug2019")
# (find-fline "~/bigsrc/emacs/src/" " emacs")

* (eepitch-shell)
* (eepitch-kill)
* (eepitch-shell)
sudo apt-get update
sudo apt-get upgrade
sudo apt-get build-dep emacs24
sudo apt-get build-dep emacs25
sudo apt-get build-dep emacs

* (eepitch-shell)
* (eepitch-kill)
* (eepitch-shell)
# rm -Rfv  ~/bigsrc/emacs/
mkdir -p ~/bigsrc/emacs/
cd       ~/bigsrc/
git clone git://git.sv.gnu.org/emacs
cd       ~/bigsrc/emacs/

git pull
git reset

# (find-gitk "~/bigsrc/emacs/")
# (find-man "gitk")

./autogen.sh  2>&1 | tee oa
./configure   2>&1 | tee oc
make          2>&1 | tee om

~/bigsrc/emacs/src/emacs
~/bigsrc/emacs/src/emacs $EMACSARGSX
~/bigsrc/emacs/src/emacs -fg bisque -bg black -fn ${EMACSFONT}
~/bigsrc/emacs/src/emacs -fg bisque -bg black -fn ${EMACSFONT} -bd blue
# (find-node "(emacs)Colors X")

# (find-gitemacsfile "")
# (find-gitemacssh "find * | sort")
# (find-gitemacssh "find * | sort | grep emacs")

installeddebs | sort | tee oinstalleddebs
tar -cvzf /tmp/emacs-git-make-fails-bug-logs.tgz oa oc om oinstalleddebs



#####
#
# Clone or update the copy of the emacs git repo in ~/bigsrc/emacs
# 2021jan17
#
#####

# «emacs-from-git-2020»  (to ".emacs-from-git-2020")
# https://www.emacswiki.org/emacs/EmacsFromGit
# (find-gitemacsfile "")
# (find-gitemacssh "git tag --list")
# (find-gitemacssh "git for-each-ref")
# (find-gitemacssh "git for-each-ref" "emacs-30")

* (eepitch-shell)
* (eepitch-kill)
* (eepitch-shell)
# rm -Rfv  ~/bigsrc/emacs/
mkdir -p ~/bigsrc/emacs/
cd       ~/bigsrc/
git clone git://git.sv.gnu.org/emacs
cd       ~/bigsrc/emacs/

git pull
# git reset
git clean -dfx
git reset --hard

cd  ~/bigsrc/emacs/
  git checkout master
# git checkout emacs-30
# git checkout emacs-28
  git pull

cd  ~/bigsrc/emacs/
export PAGER=cat
git branch --list -a
git for-each-ref
git log --oneline --graph --all -20

# (find-fline "~/usrc/")
# (find-fline "~/usrc/emacs/")
# (find-gitk  "~/usrc/emacs/")

sudo apt-get build-dep -y emacs

# This is used by:
#   (to "emacs30-from-git")
#   (to "emacs29-from-git")
#   (to "emacs28-from-git")
#   (to "emacs27-from-git")
#   (to "emacs26-from-git")
#   (to "emacs25-from-git")




#####
#
# Compile the current Emacs31 (from a copy of ~/bigsrc/emacs/)
# 2024jul20
#
#####

# «emacs31-from-git»  (to ".emacs31-from-git")
# To update the git repo in ~/bigsrc/emacs/, run this:
#   (to "emacs-from-git-2020")
# Needs: (find-es "treesit" "tree-sitter.git")

* (eepitch-shell3)
* (eepitch-kill)
* (eepitch-shell3)
rm -Rf    ~/bigsrc/emacs31/
mkdir     ~/bigsrc/emacs31/
cd        ~/bigsrc/emacs31/
git clone ~/bigsrc/emacs .

git clean -dfx

cd         ~/bigsrc/emacs31/

export PAGER=cat
git branch --list -a
git for-each-ref
git log --oneline --graph --all -20

# (find-gitk    "~/bigsrc/emacs31/")
# (magit-status "~/bigsrc/emacs31/")
# (find-fline   "~/bigsrc/emacs31/")
# (find-fline   "~/bigsrc/emacs31/och")
# (find-fline   "~/bigsrc/emacs31/oc")

# git checkout emacs-31
  git checkout master
# git checkout --detach master~100    ;# maxima font-lock doesn't work
  git checkout --detach master~400    ;# maxima font-lock doesn't work
  git checkout --detach master~1000   ;# maxima font-lock doesn't work
  git checkout --detach master~1150   ;# maxima font-lock doesn't work
  git checkout --detach master~1220   ;# maxima font-lock doesn't work
  git checkout --detach master~1230   ;# maxima font-lock doesn't work
  git checkout --detach master~1235   ;# maxima font-lock doesn't work
  git checkout --detach master~1236   ;# maxima font-lock works
  git checkout --detach master~1237   ;# maxima font-lock works
  git checkout --detach master~1240   ;# maxima font-lock works
  git checkout --detach master~1260   ;# maxima font-lock works
  git checkout --detach master~1300   ;# maxima font-lock works
  git checkout --detach master~1600   ;# maxima font-lock works

gsh  () { git show -s --date=format:'%Y-%m-%d %k:%M:%S' --format='%h %ad %s' $* }
gsh2 () { echo "$1: $(gsh $1)" }
for i in $(seq 1235 1236); do echo "master~$i: $(gsh master~$i)"; done 
for i in $(seq 1235 1236); do echo "HEAD: $(gsh HEAD)"; done 
for i in 17e26cf57e1 "17e26cf57e1~1"; do gsh2 $i; done 

# 17e26cf57e1

./autogen.sh                2>&1 | tee oa
# ./configure               2>&1 | tee oc
./configure --help          2>&1 | tee och

./configure                  \
      --with-xwidgets        \
      --with-tree-sitter=yes \
      --with-native-compilation=yes \
      --with-modules        2>&1 | tee oc
make                        2>&1 | tee om
make TAGS                   2>&1 | tee omT

# ./configure                  \
#       --without-all          \
#       --with-tree-sitter=no  \
#       --with-native-compilation=no \
#       --with-modules=no      2>&1 | tee oc

time make bootstrap          2>&1 | tee omb
time make                    2>&1 | tee om





#####
#
# Compile the current Emacs30 (from a copy of ~/bigsrc/emacs/)
# 2022dec14
#
#####

# «emacs30-from-git» (to ".emacs30-from-git")
# To update the git repo in ~/bigsrc/emacs/, run this:
#   (to "emacs-from-git-2020")
# Needs: (find-es "treesit" "tree-sitter.git")

* (eepitch-shell3)
* (eepitch-kill)
* (eepitch-shell3)
rm -Rf    ~/bigsrc/emacs30/
mkdir     ~/bigsrc/emacs30/
cd        ~/bigsrc/emacs30/
git clone ~/bigsrc/emacs .

git clean -dfx

cd         ~/bigsrc/emacs30/

export PAGER=cat
git branch --list -a
git for-each-ref
git log --oneline --graph --all -20

# (find-gitk    "~/bigsrc/emacs30/")
# (magit-status "~/bigsrc/emacs30/")
# (find-fline   "~/bigsrc/emacs30/")
# (find-fline   "~/bigsrc/emacs30/och")
# (find-fline   "~/bigsrc/emacs30/oc")

# git checkout master
  git checkout emacs-30
./autogen.sh                2>&1 | tee oa
# ./configure               2>&1 | tee oc
./configure --help          2>&1 | tee och
./configure                  \
      --with-xwidgets        \
      --with-tree-sitter=yes \
      --with-native-compilation=yes \
      --with-modules        2>&1 | tee oc
make                        2>&1 | tee om
make TAGS                   2>&1 | tee omT




#####
#
# Compile the current Emacs 29 (from a copy of ~/bigsrc/emacs/)
# 2022feb18
#
#####

# «emacs29-from-git» (to ".emacs29-from-git")
# To update the git repo in ~/bigsrc/emacs/, run this:
#   (to "emacs-from-git-2020")

# (find-git-links "git://git.sv.gnu.org/emacs" "emacs")
# git reset --hard
# git checkout HEAD

* (eepitch-shell3)
* (eepitch-kill)
* (eepitch-shell3)
rm -Rf    ~/bigsrc/emacs29/
mkdir     ~/bigsrc/emacs29/
cd        ~/bigsrc/emacs29/
git clone ~/bigsrc/emacs .

git clean -dfx

cd         ~/bigsrc/emacs29/

export PAGER=cat
git branch --list -a
git for-each-ref
git log --oneline --graph --all -20

# (find-gitk    "~/bigsrc/emacs29/")
# (magit-status "~/bigsrc/emacs29/")
# (find-fline   "~/bigsrc/emacs29/")

git checkout emacs-29.0.90
./autogen.sh                2>&1 | tee oa
# ./configure               2>&1 | tee oc
./configure --with-modules  2>&1 | tee oc
make                        2>&1 | tee om
make TAGS                   2>&1 | tee omT




#####
#
# Compile Emacs28.2 (from a copy of ~/bigsrc/emacs/)
# 2024aug03
#
#####

# «emacs283-from-git»  (to ".emacs283-from-git")
# To update the git repo in ~/bigsrc/emacs/, run this:
#   (to "emacs-from-git-2020")

* (eepitch-shell3)
* (eepitch-kill)
* (eepitch-shell3)
# (find-fline "~/bigsrc/emacs28.3/")
rm -Rfv   ~/bigsrc/emacs28.3/
mkdir     ~/bigsrc/emacs28.3/
cd        ~/bigsrc/emacs28.3/
git clone ~/bigsrc/emacs .

export PAGER=cat
git branch --list -a
git for-each-ref
git log --oneline --graph --all -20

# (find-gitk    "~/bigsrc/emacs28/")
# (magit-status "~/bigsrc/emacs28/")
# (find-fline   "~/bigsrc/emacs28/")

# git checkout master
  git checkout emacs-28.3-rc1
# git checkout emacs-28.2

./autogen.sh                2>&1 | tee oa
# ./configure               2>&1 | tee oc
./configure --with-modules  2>&1 | tee oc
make                        2>&1 | tee om
make TAGS                   2>&1 | tee omT





#####
#
# Compile Emacs28.2 (from a copy of ~/bigsrc/emacs/)
# 2024aug03
#
#####

# «emacs282-from-git»  (to ".emacs282-from-git")
# To update the git repo in ~/bigsrc/emacs/, run this:
#   (to "emacs-from-git-2020")

* (eepitch-shell3)
* (eepitch-kill)
* (eepitch-shell3)
# (find-fline "~/bigsrc/emacs28.2/")
rm -Rfv   ~/bigsrc/emacs28.2/
mkdir     ~/bigsrc/emacs28.2/
cd        ~/bigsrc/emacs28.2/
git clone ~/bigsrc/emacs .

export PAGER=cat
git branch --list -a
git for-each-ref
git log --oneline --graph --all -20

# (find-gitk    "~/bigsrc/emacs28/")
# (magit-status "~/bigsrc/emacs28/")
# (find-fline   "~/bigsrc/emacs28/")

# git checkout master
# git checkout emacs-28.3-rc1
  git checkout emacs-28.2

./autogen.sh                2>&1 | tee oa
# ./configure               2>&1 | tee oc
./configure --with-modules  2>&1 | tee oc
make                        2>&1 | tee om
make TAGS                   2>&1 | tee omT





#####
#
# Compile Emacs27 (from a copy of ~/bigsrc/emacs/)
# 2019oct14
#
#####

# «emacs27-from-git» (to ".emacs27-from-git")
# To update the git repo in ~/bigsrc/emacs/, run this:
#   (to "emacs-from-git-2020")

* (eepitch-shell)
* (eepitch-kill)
* (eepitch-shell)
# (find-fline "~/bigsrc/emacs27/")
rm -Rfv ~/bigsrc/emacs27/
mkdir   ~/bigsrc/emacs27/
cd      ~/bigsrc/emacs27/

cd      ~/bigsrc/emacs/
# git pull

cp -a .* * ~/bigsrc/emacs27/
cd         ~/bigsrc/emacs27/
git clean -dfx
# git pull

# (find-git-links "git://git.sv.gnu.org/emacs" "emacs")
# git reset --hard
# git checkout HEAD

* (eepitch-shell2)
* (eepitch-kill)
* (eepitch-shell2)
cd         ~/bigsrc/emacs27/

export PAGER=cat
git branch --list -a
git for-each-ref
git log --oneline --graph --all -20

# (magit-status "~/bigsrc/emacs27/")

git checkout emacs-27.2
./autogen.sh                2>&1 | tee oa
# ./configure               2>&1 | tee oc
./configure --with-modules  2>&1 | tee oc
make                        2>&1 | tee om
make TAGS                   2>&1 | tee omT




#####
#
# emacs26-from-git
# 2019oct14
#
#####

# «emacs26-from-git» (to ".emacs26-from-git")

* (eepitch-shell)
* (eepitch-kill)
* (eepitch-shell)
# (find-fline "~/bigsrc/emacs26/")
rm -Rv ~/bigsrc/emacs26/
mkdir  ~/bigsrc/emacs26/
cd     ~/bigsrc/emacs26/

cd         ~/bigsrc/emacs/
cp -a .* * ~/bigsrc/emacs26/
cd         ~/bigsrc/emacs26/
git clean -dfx
git pull

# (find-git-links "git://git.sv.gnu.org/emacs" "emacs")
# git reset --hard
# git checkout HEAD

* (eepitch-shell2)
* (eepitch-kill)
* (eepitch-shell2)
cd         ~/bigsrc/emacs26/

git checkout emacs-26.3
./autogen.sh  2>&1 | tee oa
./configure   2>&1 | tee oc
make          2>&1 | tee om




#####
#
# emacs25-from-git
# 2019oct14
#
#####

# «emacs25-from-git» (to ".emacs25-from-git")

* (eepitch-shell)
* (eepitch-kill)
* (eepitch-shell)
# (find-fline "~/bigsrc/emacs25/")
# (find-fline "~/bigsrc/emacs25/src/" "emacs-25.2.1")
rm -Rfv ~/bigsrc/emacs25/
mkdir   ~/bigsrc/emacs25/
cd      ~/bigsrc/emacs25/
git clone ~/bigsrc/emacs .

# cd         ~/bigsrc/emacs/
# cp -a .* * ~/bigsrc/emacs25/
# cd         ~/bigsrc/emacs25/
git clean -dfx
git pull

# (find-git-links "git://git.sv.gnu.org/emacs" "emacs")
# git reset --hard
# git checkout HEAD

* (eepitch-shell2)
* (eepitch-kill)
* (eepitch-shell2)
cd         ~/bigsrc/emacs25/

git checkout emacs-25.2
./autogen.sh  2>&1 | tee oa
./configure   2>&1 | tee oc
make          2>&1 | tee om




#####
#
# emacs24-from-git
# 2020jan01
#
#####

# «emacs24-from-git» (to ".emacs24-from-git")
# (find-es "emacs" "emacs24-on-buster")
# https://packages.debian.org/source/buster/emacs24
# https://packages.debian.org/source/buster/emacs
# (find-apt-get-source-links "emacs26")

* (eepitch-shell)
* (eepitch-kill)
* (eepitch-shell)
# (find-man "git-clone")
# (find-apt-get-source-links "emacs26")

# (code-c-d "emacs24" "~/bigsrc/emacs24/")
# (find-emacs24file "")

sudo apt-get build-dep -y   emacs

mkdir -p   ~/bigsrc/
rm -Rf     ~/bigsrc/emacs24/
cd         ~/bigsrc/
git clone git://git.sv.gnu.org/emacs ~/bigsrc/emacs24
cd         ~/bigsrc/emacs24/

export PAGER=cat
git branch --list -a
git for-each-ref

# (to "common-ancestor")
# (to "distance-between-commits")
#
git merge-base emacs-24 emacs-24.5-rc3-fixed
#
git checkout emacs-24.5-rc3-fixed
git log --oneline --graph -20
#
git checkout emacs-24
git log --oneline --graph -20
# emacs-24 is five commits ahead of emacs-24.5-rc3-fixed:
#
git log 866501efe0..HEAD --pretty=oneline

git checkout emacs-24

* (eepitch-shell)
* (eepitch-kill)
* (eepitch-shell)
# (find-fline "~/bigsrc/emacs24/")
rm -Rf     ~/bigsrc/emacs24/
mkdir      ~/bigsrc/emacs24/
cd         ~/bigsrc/emacs24/

cd         ~/bigsrc/emacs/
cp -a .* * ~/bigsrc/emacs24/
cd         ~/bigsrc/emacs24/
git clean -dfx
git pull

export PAGER=cat
git branch --list -a
git for-each-ref
git log --oneline --graph --all -20

# (find-git-links "git://git.sv.gnu.org/emacs" "emacs")
# git reset --hard
# git checkout HEAD

* (eepitch-shell2)
* (eepitch-kill)
* (eepitch-shell2)
cd         ~/bigsrc/emacs24/

git checkout emacs-24
./autogen.sh   2>&1 | tee oa
./configure    2>&1 | tee oc
# make         2>&1 | tee om
make bootstrap 2>&1 | tee omb

cd ~/bigsrc/emacs24/src/
./temacs --batch --load loadup bootstrap

# (find-fline "~/bigsrc/emacs24/omb" :end)

./temacs --batch --load loadup bootstrap




#####
#
# emacs-mirror
# 2022nov12
#
#####

# «emacs-mirror»  (to ".emacs-mirror")
# https://github.com/emacs-mirror/emacs/blob/master/etc/tutorials/TUTORIAL#L365




#####
#
# gitignore
# 2022jan20
#
#####

# «gitignore»  (to ".gitignore")
# (find-man "gitignore")
# https://github.com/github/gitignore



#####
#
# Git magic
# 2013jan06
#
#####

# «gitmagic» (to ".gitmagic")
# http://www-cs-students.stanford.edu/~blynn/gitmagic/
# (find-status   "gitmagic")
# (find-vldifile "gitmagic.list")
# (find-udfile   "gitmagic/")

;; (find-fline "/usr/share/doc/gitmagic/")
(code-xpdf     "gitmagic" "/usr/share/doc/gitmagic/gitmagic.pdf")
(code-pdf-text "gitmagic" "/usr/share/doc/gitmagic/gitmagic.pdf")
;; (find-gitmagicpage)
;; (find-gitmagictext)

# file:///usr/share/doc/gitmagic/gitmagic.html
# file:///usr/share/doc/gitmagic/html/index.html
# (find-fline "/usr/share/doc/gitmagic/html/")



#####
#
# magit-2020
# 2020oct27
#
#####

# «magit-2020»  (to ".magit-2020")
# (find-epackage-links 'magit)
# (find-epackage       'magit)
# (code-c-d "magit" "~/.emacs.d/elpa/magit-20201004.830/")
# (find-magitfile "")
# https://melpa.org/#/magit



#####
#
# Magit
# 2013jan27
#
#####

# «magit» (to ".magit")
# http://www.emacswiki.org/emacs/Magit
# http://emacswiki.org/emacs/Git
# http://www.emacswiki.org/emacs/Magit
# http://philjackson.github.com/magit/magit.html
# http://philjackson.github.com/magit/
# http://github.com/magit/magit/downloads
# http://alexott.net/en/writings/emacs-vcs/EmacsGit.html

;; https://vimeo.com/2871241 Meet Magit
;; (find-fline "/sda5/videos/")
(code-video "meetmagit" "/sda5/videos/meet_magit_504x380.flv")
;; (find-meetmagit)

http://stackoverflow.com/questions/5925372/how-to-use-git-from-emacs
http://news.ycombinator.com/item?id=1817324
http://blog.zawodny.com/2012/02/02/magit-makes-git-awesome-in-emacs/
http://zagadka.vm.bytemark.co.uk/magit/

# (find-status   "magit")
# (find-vldifile "magit.list")
# (find-udfile   "magit/")
# (find-node "(magit)Top")




#####
#
# magit (from the debian sources)
# 2013feb16
#
#####

# «magit-deb-src» (to ".magit-deb-src")
# (deleted)



#####
#
# magit from git
# 2013aug27
#
#####

# «magit-from-git» (to ".magit-from-git")
# https://github.com/magit/magit
# https://github.com/magit/magit/blob/maint/INSTALL.md
# http://magit.github.io/magit/
# http://magit.github.io/magit/magit.html
# http://melpa.milkbox.net/#/
# http://melpa.milkbox.net/#/magit
# (find-enode "Regexps" "`+?'")

* (eepitch-shell)
* (eepitch-kill)
* (eepitch-shell)
# rm -Rfv ~/usrc/magit/
cd ~/usrc/
  git clone --depth 1 https://github.com/magit/magit.git
# git clone           https://github.com/magit/magit.git
cd ~/usrc/magit/
git pull

rm -Rfv ~/usrc/magit/
cd ~/usrc/
git clone --depth 1 https://github.com/magit/magit.git
cd ~/usrc/magit/

* (eepitch-shell)
* (eepitch-kill)
* (eepitch-shell)
cd ~/usrc/magit/
git clean -dfx
git reset --hard

# emacs       -Q --batch -L . -f batch-byte-compile *.el
emacs-default -Q --batch -L . -f batch-byte-compile *.el
makeinfo -o magit.info magit.texi
rm -v ~/info/magit*
cp -v magit.info ~/info/
# (find-node "(magit)Top")
# (find-node "(~/usrc/magit/magit.info)Top")

# (add-to-list 'load-path "~/usrc/magit/")
# (require 'magit)

# (find-fline "~/usrc/magit/")
# (find-fline "~/usrc/magit/magit.info")
#  install-info --dir=$HOME/info magit.info
# ginstall-info --dir=$HOME/info magit.info
# (find-sh "ginstall-info --help")

# (find-zsh "dmissing cl-lib")

git branch
git checkout maint
git checkout master
make lisp docs

# (find-gitk "~/usrc/magit/")
# (magit-status "~/usrc/magit/")
# (find-sh "git --help")
# (find-man "1 git-checkout")


# (code-c-d "magit" "~/usrc/magit/")
# (find-magitfile "")
# (find-magitfile "INSTALL.md")
# (find-magitfile "INSTALL.md" "emacs -Q --batch")
# (find-magitfile "Makefile")
# (find-magitfile "Makefile" "install-all:")
# (find-magitsh "make -n lisp docs")

make PREFIX=$PATH install |& tee om
git pull

# (find-fline "~/usrc/magit/")

# https://github.com/magit/magit.git






#####
#
# Very hard reset
# 2013jan19
#
#####

# «very-hard-reset» (to ".very-hard-reset")
# http://stackoverflow.com/questions/61212/removing-untracked-files-from-your-git-working-copy
# (find-man "1 git-clean")
#
# I am looking for a standard way to do something equivalent to what
# the code below does - erasing everything but the .git/ directory,
# then doing a git reset to populate the working directory again...
#
# Maybe git clean -dfx? The stackoverflow link above has some hints...

* (eepitch-shell)
* (eepitch-kill)
* (eepitch-shell)
# Reset the working directory from the .git/ directory.
# This is MUCH stronger than a "make clean".
# (find-man "1 git-clean")
# (find-man "1 git-reset")
# (find-man "1 git-pull")
#
cd   ~/bigsrc/git/emacs/
find ~/bigsrc/git/emacs/ -maxdepth 1 -mindepth 1 | sort
find ~/bigsrc/git/emacs/ -maxdepth 1 -mindepth 1 | sort | grep -v '/\.git$'
rm -Rv $(
find ~/bigsrc/git/emacs/ -maxdepth 1 -mindepth 1 | sort | grep -v '/\.git$'
)
git pull

git clean -dfx
git reset --hard






#####
#
# Merging two different repos
# 2013feb10
#
#####

# «merge-different» (to ".merge-different")

* (eepitch-shell)
* (eepitch-kill)
* (eepitch-shell)
rm -Rfv /tmp/a/
rm -Rfv /tmp/b/
mkdir   /tmp/a/
mkdir   /tmp/b/
cp -av /sda6/nikon/containers/*.JPG /tmp/a/
cp -av /sda6/nikon/estantes/*.JPG   /tmp/b/
# (find-fline "/tmp/a/")
# (find-fline "/tmp/b/")
cd /tmp/a/ && git init && git add *.JPG && git commit -a -m "add a"
cd /tmp/b/ && git init && git add *.JPG && git commit -a -m "add b"
cd /tmp/a/ && git tag a
cd /tmp/b/ && git tag b
cd /tmp/a/
git remote rm  bs
git remote add bs  edrx@127.0.0.1:/tmp/b
git fetch      bs

# ^ The script above works.
#   The rest are just notes.

git clone edrx@127.0.0.1:/tmp/b
git fetch bs/master

git clone ssh://user@server:project.git


git://localhost/tmp/b/
git remote add bg git://localhost/tmp/b/
git fetch bg

git remote add b /tmp/b/
git remote
git fetch b
git merge b/master

git remote add t /tmp/
git remote
git remote rm t
git remote rm b


# (find-man "1 git-remote")
# (find-man "1 git-push")
# (find-man "1 git-branch")
# (find-man "1 git-clone")
# (find-man "1 git-pull")
# (find-man "1 git-fetch")

gitk . &

# (find-fline "/tmp/a/")
# (find-fline "/tmp/b/")




#####
#
# The default branch
# 2013feb23 / 2018mai30
#
#####

# «default-branch» (to ".default-branch")
# (find-man "1 git-checkout")
# (find-man "1 git-branch")
# (find-gitdocfile "")
# (find-gitdocfile "cmds-plumbingmanipulators.txt")
# (find-progitpage (+ 24 48) "default branch")
# (find-progittext (+ 24 48) "default branch")
# (find-progitpage (+ 24 51) "moves forward with each commit")
# (find-progittext (+ 24 51) "moves forward with each commit")

# (find-fline "~/LOGS/2018may29.git" "<gitinfo> HEAD")

# https://help.github.com/en/articles/setting-the-default-branch




#####
#
# git server
# 2013feb10
#
#####

# «git-server» (to ".git-server")
# http://git-scm.com/book/en/Git-on-the-Server-The-Protocols
# http://git-scm.com/book/en/Git-on-the-Server-Setting-Up-the-Server



#####
#
# git-instaweb
# 2013feb01
#
#####

# «git-instaweb» (to ".git-instaweb")
# (find-es "http" "lighthttpd")
# (find-man "1 git-instaweb")
# (find-man "1 git-instaweb" "Default: lighttpd")



#####
#
# Not compressing big binary files
# 2013feb12
#
#####

# «not-compressing» (to ".not-compressing")
# http://stackoverflow.com/questions/540535/managing-large-binary-files-with-git
# https://github.com/apenwarr/bup

# http://superuser.com/questions/406907/why-is-git-so-slow-with-large-files
#   git set core.compression 0
# http://git.661346.n2.nabble.com/How-to-prevent-Git-from-compressing-certain-files-td3305492.html
# http://www.gitguys.com/topics/creating-a-shared-repository-users-sharing-the-repository/
# http://git-scm.com/book/en/Git-Tools-Submodules

# http://stackoverflow.com/questions/7102053/git-pull-without-remotely-compressing-objects
#   echo '*.zip -delta' > .gitattributes
#   git gc
# (find-man "5 gitattributes")
# (find-man "5 gitattributes" "Delta compression will not be attempted")
# (find-gitdocgrep "grep -nirH -e delta *")

# A test. Some lines were borrowed from:
#   (to "merge-different")

* (eepitch-shell)
* (eepitch-kill)
* (eepitch-shell)
rm -Rfv /tmp/a/
rm -Rfv /tmp/b/
mkdir   /tmp/a/
mkdir   /tmp/b/
cp -av /sda6/nikon/containers/*.JPG /tmp/a/
# (find-fline "/tmp/a/")
# (find-fline "/tmp/b/")
cd /tmp/a/
  git init
  git add *.JPG
  git commit -a -m "add a"
  git gc
  git gc
cd /tmp/b/
  time sshpass -p edrx git clone edrx@127.0.0.1:/tmp/a/

# Cloning into a...
# remote: Counting objects: 53, done.        
# remote: Compressing objects: 100% (53/53), done.        
# remote: Total 53 (delta 0), reused 0 (delta 0)        
# Receiving objects: 100% (53/53), 5.83 MiB | 3.37 MiB/s, done.
# sshpass -p edrx git clone edrx@127.0.0.1:/tmp/a/  1.32s user 0.25s system 37% cpu 4.163 total

* (eepitch-shell)
* (eepitch-kill)
* (eepitch-shell)
rm -Rfv /tmp/a/
rm -Rfv /tmp/b/
mkdir   /tmp/a/
mkdir   /tmp/b/
cp -av /sda6/nikon/containers/*.JPG /tmp/a/
# (find-fline "/tmp/a/")
# (find-fline "/tmp/b/")
cd /tmp/a/
  echo '*.JPG -delta' > .gitattributes
  # git gc
  git init
  git add *.JPG
  git commit -a -m "add a"
  # git gc
  # git gc
cd /tmp/b/
  time sshpass -p edrx git clone edrx@127.0.0.1:/tmp/a/

# Cloning into a...
# remote: Counting objects: 53, done.        
# remote: Compressing objects: 100% (53/53), done.        
# remote: Total 53 (delta 0), reused 53 (delta 0)        
# Receiving objects: 100% (53/53), 5.83 MiB | 7.71 MiB/s, done.
# sshpass -p edrx git clone edrx@127.0.0.1:/tmp/a/  1.17s user 0.26s system 83% cpu 1.705 total



http://gitcasts.com/






#####
#
# git-annex
# 2013feb13
#
#####

# «git-annex» (to ".git-annex")
# (find-status   "git-annex")
# (find-vldifile "git-annex.list")
# (find-udfile   "git-annex/")
# http://git-annex.branchable.com/
# (find-fline "/usr/share/doc/git-annex/html/")
# file:///usr/share/doc/git-annex/html/index.html



#####
#
# diags (i.e., using git to help porting an article to dednat5)
# 2013jan25
#
#####

# «diags» (to ".diags")

# (find-git-links "~/" "git://" "diags" "diags")

* (eepitch-shell)
* (eepitch-kill)
* (eepitch-shell)
# (find-fline "~/diags/")
rm -Rfv ~/diags/
mkdir  ~/diags/
cd     ~/diags/
cp -v ~/LATEX/2010diags.tex .
git init
git add 2010diags.tex
git commit -m "initial"

cp -v ~/dednat4/examples/edrx08.sty .
cp -v ~/dednat4/examples/edrxdnt.tex .
cp -v ~/dednat4/examples/diagxy.tex .
cp -v ~/dednat4/examples/edrxdefs.tex .
cp -v ~/dednat4/examples/edrxheadfoot.tex .
cp -v ~/LATEX/frob-sketch.eps .
git add *.sty *.tex *.eps
git commit -m "added source dependencies"

# (find-fline "~/diags/2010diags.tex" ".eps")
# (find-man "1 git-commit")
git commit -a -m "fixed .eps"

epstopdf frob-sketch.eps
~/dednat4/dednat41 2010diags.tex
   latex 2010diags.tex
pdflatex 2010diags.tex

* (eepitch-shell)
* (eepitch-kill)
* (eepitch-shell)
cd     ~/diags/
# (find-dn4exfile "")
# (find-dn4exfile "edrx08.sty")
cp -v ~/dednat4/examples/edrx08.sty .
cp -v ~/dednat4/examples/edrxdnt.tex .
cp -v ~/dednat4/examples/diagxy.tex .
cp -v ~/dednat4/examples/edrxdefs.tex .
cp -v ~/dednat4/examples/edrxheadfoot.tex .
~/dednat4/dednat41 2010diags.tex
cp -v ~/LATEX/frob-sketch.eps .
epstopdf frob-sketch.eps

latex 2010diags.tex
pdflatex 2010diags.tex

git add 2010diags.tex

#   git config --global user.email eduardoochs@gmail.com
# If the identity used for this commit is wrong, you can fix it with:
#   git commit --amend --author='Eduardo Ochs <eduardoochs@gmail.com>'

# (code-c-d "diags" "~/diags")
# (find-diagsfile "")
# (find-diagssh0 "gitk")




#####
#
# eev repository: using two branches
# 2013feb15
#
#####

# «eev-branches» (to ".eev-branches")
# (find-books "__comp/__comp.el" "git")
# (find-gitinternalspage  75 "Branching")




#####
#
# Git doesn't store mtimes
# 2013feb16
#
#####

# «mtimes» (to ".mtimes")
# (find-fline "~/LOGS/2013feb16.git")
# https://git.wiki.kernel.org/index.php/GitFaq#Why_isn.27t_Git_preserving_modification_time_on_files.3F

# (find-status   "etckeeper")
# (find-vldifile "etckeeper.list")
# (find-udfile   "etckeeper/")




#####
#
# git (from the debian sources)
# 2013feb23
#
#####

# «git-deb-src» (to ".git-deb-src")
# http://ftp.de.debian.org/debian/pool/main/g/git/
# http://ftp.de.debian.org/debian/pool/main/g/git/git_1.7.10.4-2.dsc
# http://ftp.de.debian.org/debian/pool/main/g/git/git_1.7.10.4-2.diff.gz
# http://ftp.de.debian.org/debian/pool/main/g/git/git_1.7.10.4.orig.tar.gz
#*
rm -Rv ~/usrc/git/
mkdir  ~/usrc/git/
cd $S/http/ftp.de.debian.org/debian/pool/main/g/git/
cp -v git_1.7.10.4* ~/usrc/git/
cd     ~/usrc/git/
dpkg-source -sn -x git_1.7.10.4-2.dsc
cd     ~/usrc/git/git-1.7.10.4/

find * -type f        | sort > .files
find * -name '*.[ch]' | sort > .files.ch
etags $(<.files.ch)

# dpkg-buildpackage -us -uc -b -rfakeroot     |& tee odb

#*
# (find-fline "~/usrc/git/")
* (eepitch-shell)
cd ~/usrc/git/
sudo dpkg -i *.deb

#*
# (code-c-d "gitsrc" "~/usrc/git/git-1.7.10.4/")
# (find-gitsrcfile "")
# (find-gitsrcfile ".files")
# (find-gitsrcfile ".files.ch")





#####
#
# Bare repos
# 2013feb24
#
#####

# «bare-repos» (to ".bare-repos")
# http://bare-vs-nonbare.gitrecipes.de/
# (find-fline "~/LOGS/2013feb24.git")
# (find-man "1 git-add")

# (find-man "1 git-rm")
# (find-man "1 git-commit")
# (find-es "git" "git-test")
# (find-books "__comp/__comp.el" "git")
# (find-fline "/tmp/git-a/")

* (eepitch-shell)
* (eepitch-kill)
* (eepitch-shell)
export PAGER=cat
export PS1="%d# "
N=0
  N () { echo $N; }
++N () { N=$[$N+1]; echo $N; }
Dump1   () { echo $1 \($(cat $1)\); }
Dumps   () { for i in $*; do Dump1 $i; done; }
Dump    () { Dumps $(find * -type f | sort); }
Modify1 () { ++N >> $1; Dump1 $1; }
Modify  () { for i in $*; do Modify1 $i; done; }

# My objective:
# to create a branch called "eev-0.95.3" with the files a,b,c,d,
#  and also a branch called "eev2"       with the files     c,d,e,f,
# and to be able to be able to push ("commit"?) new versions of files
# to both branches, without the switch to the other branch deleting
# the files that were only the previous branch...

# (find-gitinternalspage 24 "HEAD")
# (find-gitinternalstext 24 "HEAD")
# (find-gitinternalspage 113 "HEAD")
# (find-gitinternalstext 113 "HEAD")
# (find-man "1 git-checkout")
# (find-man "1 git-reset")
# (find-man "1 git-ls-files")
# (find-man "1 git-branch")
# (find-gitdocfile "")
# (find-gitdocfile "cmds-plumbinginterrogators.txt")

N=0
rm -Rf /tmp/git-a/
mkdir  /tmp/git-a/
cd     /tmp/git-a/
Modify a b c d e f g h
Dump
git init

git add a b c d
git commit -a -m 'Initial commit for eev-0.95.3'
git branch eev-0.95.3
  git log --oneline --graph --decorate --all

git rm --cached a b c d
git add c d e f
git branch eev2
git reset  eev2
git commit -a -m 'Initial commit for eev2'
  git log --oneline --graph --decorate --all

git checkout eev-0.95.3
Modify a
git commit -a -m 'changed a'
  git log --oneline --graph --decorate --all




N=0
rm -Rf /tmp/git-a/
mkdir  /tmp/git-a/
cd     /tmp/git-a/
Modify a b c
Dump
git init
git add a b c
git commit -a -m 'one'
  git log --oneline --graph --decorate --all

# (find-man "1 git-merge")
# (find-man "1 git-merge" "--ff-only")
# (find-man "git-branch")

git branch B1
#git reset  B1
 git checkout B1
git branch -d master
Modify a
git commit -a -m 'two'
  git log --oneline --graph --decorate --all

Modify a
git commit -a -m 'three'
  git log --oneline --graph --decorate --all




#####
#
# A prototype for what I need for the repo containing eev2 and eev-0.95.3
# 2013feb24
#
#####

# «eev2-and-0.95.3-prototype» (to ".eev2-and-0.95.3-prototype")
# «obsoletes-in-angg» (to ".obsoletes-in-angg")

* (eepitch-shell)
* (eepitch-kill)
* (eepitch-shell)
export PAGER=cat
export PS1="%d# "
N=0
  N () { echo $N; }
++N () { N=$[$N+1]; echo $N; }
Dump1   () { echo $1 \($(cat $1)\); }
Dumps   () { for i in $*; do Dump1 $i; done; }
Dump    () { Dumps $(find * -type f | sort); }
Modify1 () { ++N >> $1; Dump1 $1; }
Modify  () { for i in $*; do Modify1 $i; done; }

N=0
rm -Rf /tmp/git-a/
mkdir  /tmp/git-a/
cd     /tmp/git-a/
Modify a ab b c
git init
git add a ab
git commit -a -m 'one'
  git log --oneline --graph --decorate --all

git branch A
git branch B
#git reset  A
git checkout A
git branch -d master

Modify a
git commit -a -m 'two'
  git log --oneline --graph --decorate --all

git checkout B
  git log --oneline --graph --decorate --all

git rm --cached a ab
git add ab b
git commit -a -m 'three'
  git log --oneline --graph --decorate --all
  # * 988a945 (HEAD, B) three
  # | * b502c95 (A) two
  # |/  
  # * 0ef5bf2 one

git checkout $(git rev-list -n 1 HEAD)
git reset --soft A
  git log --oneline --graph --decorate --all

Modify a
git commit -a -m 'four'
  git log --oneline --graph --decorate --all



# **** test ****
# (find-man "1 git-checkout")
# (find-man "1 git-checkout" "\nDETACHED HEAD\n")
# (find-angg "bin/git-set-head")
#
git-set-head A
git commit -a -m '95 a'
git-set-head B





git checkout $(git rev-list -n 1 HEAD)
git reset --soft eev-0.95.3
  git log --oneline --graph --decorate --all


git checkout $(git rev-list -n 1 HEAD)



# Garbage:

Dump
# (find-man "1 git-rev-list")
               git rev-list -n 1 HEAD

#git reset A
git reset --soft A
#git checkout --conflict soft A
  git log --oneline --graph --decorate --all
  # * b502c95 (HEAD, B, A) two
  # * 0ef5bf2 one
  #
  # the "git reset" made the commit "three" sort of inaccessible... =(

# (find-man "1 git-checkout")
# (find-man "1 git-reset")

Dump

git rev-list --oneline HEAD

Modify f
git reset eev2
git commit -a -m 'changed f'
git rev-list --oneline HEAD

git log --oneline --graph --decorate --all

$ git log --pretty=format:"%h %s" --graph

*   9abcdef (eev-0.95.3,HEAD) changed b
| * 6789abc (eev2,master) changed f
| * 30e367c changed e
* | 5a09431 changed a
| * e1193f8 Initial commit for eev2
|/
* 11d191e Initial commit for eev-0.95.3

Dump
git reset eev-0.95.3
Dump

git reset eev-0.95.3

gitk &

# Create a commit that will be the root of the tree
# Is there a way to make an initial commit with no files?
git add c d
git commit -a -m 'Initial commit, with some files in the intersection'

git branch eev-0.95.3
git add a b c d
git commit -a -m 'Initial commit for eev-0.95.3'

git branch master
git add c d
git commit -a -m 'Initial commit for eev2'

gitk &




#####
#
# Detached HEAD
# 2013feb24 / 2019aug11
#
#####

# «detached-head» (to ".detached-head")
# (find-angg "bin/git-set-head")
# http://stackoverflow.com/questions/3965676/why-did-git-detach-my-head
# http://alblue.bandlem.com/2011/08/git-tip-of-week-detached-heads.html
# http://eclipsesource.com/blogs/2011/05/29/life-lesson-be-mindful-of-a-detached-head/
# http://sitaramc.github.com/concepts/detached-head.html
# (find-gitdocgrep "grep --color -niH -e detached *.txt")

# (find-fline "~/LOGS/2019aug11.git")
<edrx> hey, is there a cleaner way to set the working directory to
       the commit b6bb292 than "git checkout b6bb292"? I am
       _sometimes_ getting the message "You are in 'detached HEAD'
       etc etc", which gives me impression that I doing something
       very fragile...
<nedbat> edrx: i would expect you would always get that message
         when checking out a hash like that.
<edrx> nedbat: ok, I'll try to understand what "detached HEAD"
       means... I was just trying to create a script that would
       reproduce a bug in the current version of a package and that
       would still work - I mean, the script would still work to
       show the bug - after I fixed the bug in later commits...
<nedbat> edrx: detached head means that you aren't on any branch
<nedbat> edrx: if you don't plan to make any commits in that state,
         it's nothing to worry about
<edrx> nedbat: aaah! thanks! so that's exactly what I wanted =) =)
       =)




#####
#
# Gitorious
# 2013jul20
#
#####

# «gitorious» (to ".gitorious")
# eduardoochs B4
# https://gitorious.org/~eduardoochs

# (find-es "ssh" "ssh-keygen")

http://www.wikivs.com/wiki/GitHub_vs_Gitorious
http://noone.org/blog/English/Computer/VCS/Thoughts%20on%20Gitorious%20and%20GitHub%20plus%20a%20useful%20git%20hook.html
http://gitorious.org/
https://gitorious.org/users/new




#####
#
# Git instructions at Org
# 2013aug11
#
#####

# «org-contribute» (to ".org-contribute")
http://orgmode.org/worg/org-contribute.html ***




#####
#
# A simple git repository for eev
# 2013aug21
#
#####

# «eev-git-repo-simple» (to ".eev-git-repo-simple")
# (find-angg ".zshrc" "eev2-files")
# (find-zsh "eev2-files-all")

* (eepitch-shell)
* (eepitch-kill)
* (eepitch-shell)
rm -Rfv /tmp/.git/
cd      /tmp/
git init
echo 0 > VERSION
git add VERSION
git commit -a -m 'Initial commit (empty repo)'

rm -Rfv ~/eev-current/.git/
cd      ~/eev-current/
git init
git add $(eev2-files-all)
git commit -a -m 'Initial commit for eev2'
# gitk &

# 2013aug26
git remote add origin https://github.com/edrx/eev.git
git push -u origin master


cd ~/eev-current/
git remote
git remote rm  rmt
# git remote add rmt file:///tmp/
git remote add rmt /tmp/
git remote -v
git push -f rmt

# (find-man "git-push")
# (find-sh "git push --help")
# (find-sh "git push --help" "fast-forward")





#####
#
# creating a bare repo and pushing to it
# 2013aug25
#
#####

# «create-bare-and-push» (to ".create-bare-and-push")
# (find-man "1 git-clone")
# (find-gitdocfile "git-init.txt")
# (find-gitdocfile "git-init.txt" "--bare::")
# (find-gitdocfile "git-clone.txt")
# (find-gitdocfile "git-clone.txt" "hardlinked")
# (find-gitdocfile "git-clone.txt" "URLS")
# (find-gitdocfile "urls.txt")
# (find-man "1 ls" "-i, --inode")

# http://pastebin.com/yqBhmRg0
# http://bare-vs-nonbare.gitrecipes.de/

* (eepitch-shell)
* (eepitch-kill)
* (eepitch-shell)
rm -Rf /tmp/public/
mkdir  /tmp/public/
cd     /tmp/public/
git init --bare

rm -Rf /tmp/here/
mkdir  /tmp/here/
cd     /tmp/here/
git clone /tmp/public/ .
echo 1 > VERSION
echo 2 > otherfile
git add VERSION otherfile
git commit -a -m 'Created a git repository'
git push origin master

# (find-fline "/tmp/public/")
# (find-gitk  "/tmp/public/")
# (find-fline "/tmp/here/")
# (find-gitk  "/tmp/here/")
# (find-fline "~/eev-current/")
# (find-gitk  "~/eev-current/")



* (eepitch-shell)
* (eepitch-kill)
* (eepitch-shell)
rm -Rf /tmp/public/
mkdir  /tmp/public/
cd     /tmp/public/
git init --bare

# (find-fline "~/eev-current/")
rm -Rf ~/eev-current/.git/
cd     ~/eev-current/
git remote /tmp/public/
git add VERSION otherfile
git commit -a -m 'Created a git repository'
git push origin master

# (find-zsh "eev2-files-all")



#####
#
# git log
# 2018jun03
#
#####

# «git-log» (to ".git-log")
# (find-gitdoc-links "log")
# (find-man "1 git-log")
# (find-man "1 git-log" " --oneline")
# (find-man "1 git-log" " --graph")
# (find-man "1 git-log" "--topo-order")
# (find-man "1 git-log" "--date-order")
# (find-man "1 git-log" "--decorate")
# (find-man "1 git-log" "--all\n")
# (find-es "emacs" "rudybot")
# (find-man "1 git-log")
# (find-man "1 git-log" "  oneline")
# (find-eevsh0 "PAGER=cat git log -1 --pretty=oneline")
# (find-eevsh0 "PAGER=cat git log -1 --pretty=tformat:%s")

# (find-gitdocfile     "git-log.txt")
# (find-udfile "git-doc/git-log.txt")

# (code-c-d "eevg" "/tmp/eev-g/")
# (find-eevgfile "")

* (eepitch-shell)
* (eepitch-kill)
* (eepitch-shell)
cd /tmp/eev-g/
export PAGER=cat
git log --oneline --graph --decorate --all --date-order
git log --oneline --graph --decorate --all --date-order
git log
git log --oneline
git log --oneline --graph
git log --oneline --graph --all
git log --oneline --graph --all -5
git log --oneline --graph --all -20

seq 1 20; git log 22702eb
seq 1 20; git log 22702eb -1
seq 1 20; git log 22702eb -1 --decorate
seq 1 20; git log 22702eb -1 --decorate=full
seq 1 20; git log 22702eb -1 --source
seq 1 20; git log 22702eb -1 --full-diff

<wagle> how would I show the names of deleted files in "git log"?
<wagle> aha!  git log --name-only --pretty=format:




#####
#
# "git log --format" and "git show --format"
# 2019oct14
#
#####

# «git-log-format»   (to ".git-log-format")
# «git-show-format»  (to ".git-show-format")
# (find-man "1 git-log")
# (find-man "1 git-log" "--pretty[=<format>], --format=<format>")
# (find-man "1 git-log" "\nPRETTY FORMATS")
# (find-man "1 git-log" "\nPRETTY FORMATS" "format:<string>")
# (find-man "1 git-log" "\nPRETTY FORMATS" "%H: commit hash")
# (find-man "1 git-log" "\nPRETTY FORMATS" "%ad: author date")
# (find-man "1 git-log" "--date=<format>")
# (find-man "1 git-log" "--date=format:...")
# (find-man "1 git-log" "%s: subject")
# (find-man "1 git-show")
# (find-man "1 git-show" "-s, --no-patch")
# (find-efunction 'date)

* (eepitch-shell)
* (eepitch-kill)
* (eepitch-shell)
rm -Rfv /tmp/eev-g/
mkdir   /tmp/eev-g/
cd      /tmp/eev-g/
git clone https://github.com/edrx/eev.git .

* (eepitch-shell)
* (eepitch-kill)
* (eepitch-shell)
cd      /tmp/eev-g/
export PAGER=cat

# (find-gitk "/tmp/eev-g/")
git log     --date=format:%Y-%m-%d --format='%h %ad %s'
git show -s --date=format:%Y-%m-%d --format='%h %ad %s'
git show -s --date=format:'%Y-%m-%d %k:%M:%S' --format='%h %ad %s' HEAD~4

gsh () { git show -s --date=format:'%Y-%m-%d %k:%M:%S' --format='%h %ad %s' $* }
for i in $(seq 0 20); do echo "HEAD~$i: $(gsh HEAD~$i)"; done 

* (eepitch-shell)
* (eepitch-kill)
* (eepitch-shell)
# (find-angg ".zshrc" "git-show-my")
cd      /tmp/eev-g/
export PAGER=cat
for i in $(seq 0 20); do echo "HEAD~$i: $(git-show-my HEAD~$i)"; done 





#####
#
# Using git-log and git-difftool to compare the different versions of a file
# 2020nov07
#
#####

# «git-log-difftool»  (to ".git-log-difftool")
# (find-es "luatex" "lualibs")
# (find-man "1 git-difftool")

* (eepitch-shell)
* (eepitch-kill)
* (eepitch-shell)
rm -Rfv ~/usrc/lualibs/
cd      ~/usrc/
git clone https://github.com/latex3/lualibs
cd      ~/usrc/lualibs/

cd ~/usrc/lualibs/
export PAGER=cat
git difftool --tool-help

git log --oneline lualibs-package.lua
git log --date=format:%Y-%m-%d --format="%h %ad %s" lualibs-package.lua
git difftool -y --tool=tkdiff       1a15e0c d96d015 lualibs-package.lua




#####
#
# git-difftool
# 2020nov08
#
#####

# «git-difftool»  (to ".git-difftool")
# (find-man "1 git-difftool")
# https://stackoverflow.com/questions/255202/how-do-i-view-git-diff-output-with-my-preferred-diff-tool-viewer




#####
#
# changing the last commit message
# 2013aug28
#
#####

# «last-commit-message» (to ".last-commit-message")
# (find-man "1 git-commit")
# (find-man "1 git-commit" " --amend")

* (eepitch-shell)
* (eepitch-kill)
* (eepitch-shell)
echo "a `echo foo` b"

cd ~/eev-current/
# (find-gitk "~/eev-current/")
git commit --amend -a -m "Added \`ee-copy-after-and' and \`find-eejumps'"
# (find-gitk "~/eev-current/")




#####
#
# The #git irc channel
# 2013aug28
#
#####

# «irc-channel» (to ".irc-channel")
# (find-es "grub" "libreboot-irc")
# (find-freenode "#git")
# (find-freenode "gitinfo")
# http://jk.gs/git/bot/trigger.php
# https://gitirc.eu/

(defun g2 () (interactive) (find-rcirc-buffer-2a "irc.freenode.net" "#eev #emacs #git" nil "#git"))
(defun g3 () (interactive) (find-rcirc-buffer-3a "irc.freenode.net" "#eev #emacs #git" nil "#git"))

<rafasc> !book
<gitinfo> There are several good books available about git; 'Pro
          Git' is probably the best: http://git-scm.com/book but
          also look at !bottomup !cs !gcs !designers !gitt !vcbe
          and !parable

* (eepitch-to-buffer "gitinfo@irc.freenode.net")
!book
!bottomup
!cs
!gcs
!designers
!gitt
!vcbe
!parable

# (find-freenode-2a "gitinfo")
* (eepitch-freenode "gitinfo")
!book
!bottomup
!cs
!gcs
!designers
!gitt
!vcbe
!parable



#####
#
# github guides
# 2017jul29
#
#####

# «github-guides» (to ".github-guides")
# https://guides.github.com/activities/hello-world/




#####
#
# Downloading the git tree for eev in verena
# 2017jul30
#
#####

# «eev-verena» (to ".eev-verena")

* (eepitch-shell)
* (eepitch-kill)
* (eepitch-shell)
rm -Rfv ~/usrc/eev/
cd      ~/usrc/
git clone https://github.com/edrx/eev
cd      ~/usrc/eev/
git ls-files
git ls-files > /tmp/of

cd ~/eev-current/
(TZ=GMT date; date) > VERSION
# cp -iv $(cat /tmp/of) ~/usrc/eev/
cp    -v $(cat /tmp/of) ~/usrc/eev/

cd      ~/usrc/eev/
git ls-files -m
git commit -a -m "First commit in two years; \`find-eev-quick-intro', \`to-latin1', and lots more"

# (find-fline "~/usrc/eev/")
# (find-fline "~/eev-current/")

rm -Rfv ~/eev-current/.git/
cp -av  ~/usrc/eev/.git ~/eev-current/



# (find-eev2-links)
# (find-git-links "https://github.com/edrx/eev" "ueev")
# (find-man "git-ls-files")
# (find-fline "~/usrc/")
# (find-fline "~/usrc/eev/")





#####
#
# Generating zips and tarballs from git trees
# 2018mai13
#
#####

# «git-archive» (to ".git-archive")
# (find-gitdocfile "git-archive.txt")
# (find-gitdocfile "git-archive.txt" "<tree-ish>::")
# (find-gitdocfile "git-archive.txt" "git archive --format=tar ")

* (eepitch-shell)
* (eepitch-kill)
* (eepitch-shell)
cd ~/eev-current/
git archive --list
git archive -o /tmp/eev.tgz HEAD
# (find-fline "/tmp/eev.tgz")

# (find-books "__comp/__comp.el" "git-progit")
# (find-books "__comp/__comp.el" "git-progit" "Branching")

rm -Rfv /tmp/eev-current/
mkdir   /tmp/eev-current/
cd      /tmp/eev-current/
tar -xvzf /tmp/eev.tgz
git init
git add *
git commit -a -m 'Initial'
git checkout -b UTF-8
git checkout -b unibyte
(TZ=GMT date; date) > VERSION
git commit -a -m 'Several files are still unibyte/raw-text here'
git checkout UTF-8
(TZ=GMT date; date) > VERSION
git commit -a -m 'Starting to convert to UTF-8'
(TZ=GMT date; date) > VERSION
git commit -a -m 'More UTF-8 changes'

# (find-gitk "/tmp/eev-current/")





#####
#
# Compare eev repositories at ~/eev-current/ and at github
# 2018mai16
#
#####

# «compare-eev-local-and-github» (to ".compare-eev-local-and-github")
# (find-fline "/tmp/")

* (eepitch-shell)
* (eepitch-kill)
* (eepitch-shell)
rm -Rfv /tmp/eev-local/
mkdir   /tmp/eev-local/
cd      /tmp/eev-local/
git clone ~/eev-current/ .
# (find-gitk "/tmp/eev-local/")

* (eepitch-shell)
* (eepitch-kill)
* (eepitch-shell)
rm -Rfv /tmp/eev
cd      /tmp/
git clone https://github.com/edrx/eev.git
cd      /tmp/eev/
# (find-fline "/tmp/eev/")
# (find-gitk  "/tmp/eev/")

# 2018mai31:
cd      /tmp/eev/
git checkout UTF-8
# (find-gitk "/tmp/eev/")

git ls-files | tee /tmp/.files
(cd ~/eev-current/ && for i in $(cat /tmp/.files); do cp -v $i /tmp/eev/; done)
(TZ=GMT date; date) | tee VERSION
git ls-files -m

MSG="Quote function names like this: \`foo'"
MSG="Add \`find-eev-install-intro' and \`find-eev-install-links'"
echo "$MSG"
git commit -a -m "$MSG"

cp -v VERSION ~/eev-current/

git remote -v
git push
# https://github.com/edrx/eev.git



cd ~/eev-current/;  git remote -v
cd /tmp/eev/;       git remote -v
cd /tmp/eev-local/; git remote -v

# 2018mai16: push to github a commit from 2017
cd /tmp/eev-local/
git remote add github https://github.com/edrx/eev
git remote -v
git push github

# 2018mai16: push to github lots of things that were only in my HD
cd ~/eev-current/
# (find-gitk "~/eev-current/")
git ls-files
git add ChangeLog
git ls-files
(TZ=GMT date; date) > VERSION
git commit -a -m "First commit after an HD crash; lots of changes"
git remote add github https://github.com/edrx/eev
git remote -v
git push github

# 2018mai16: add a branch "unibyte"
cd ~/eev-current/
git checkout -b UTF-8
git checkout -b unibyte
# (find-gitk "~/eev-current/")
(TZ=GMT date; date) > VERSION
git commit -a -m 'Several files are still unibyte/raw-text here'
git push github

git checkout unibyte



cd      /tmp/eev/
git checkout -b UTF-8
git checkout -b unibyte
(TZ=GMT date; date) > VERSION
git commit -a -m 'Several files are still unibyte/raw-text here'
git checkout UTF-8
cp -v ~/eev-current/ChangeLog      .
cp -v ~/eev-current/eev-anchors.el .
cp -v ~/eev-current/eev-codings.el .
cp -v ~/eev-current/eev2-all.el    .
git add eev-codings.el
(TZ=GMT date; date) > VERSION
git commit -a -m 'Added eev-codings.el, started to convert files to UTF-8'

git remote add github https://github.com/edrx/eev
git remote -v
git push github unibyte
git push github UTF-8


# (find-fline "/tmp/eev/")
# (find-gitk "/tmp/eev/")









#####
#
# git-remote
# 2018mai16
#
#####

# «git-remote» (to ".git-remote")
# (find-man "1 git-remote")
# (find-books "__comp/__comp.el" "git-progit2")
# (find-progit2text (+ 6  50)   "Working with Remotes")
# (find-progit2page (+ 6  50)   "Working with Remotes")
# (find-progit2page (+ 6  52)   "Adding Remote Repositories")
# (find-progit2text (+ 6  52)   "Adding Remote Repositories")

* (eepitch-shell)
* (eepitch-kill)
* (eepitch-shell)
rm -Rfv /tmp/eev-g
mkdir   /tmp/eev-g/
cd      /tmp/eev-g/ && git clone https://github.com/edrx/eev.git .
cd      /tmp/eev-g/
git checkout UTF-8

git remote -v
git remote add localelpa ~/usrc/elpa/
git remote -v

git fetch localelpa
git merge localelpa/externals/eev

git merge --abort
git add eev-pkg.el
git merge localelpa/externals/eev


# (magit-status "/tmp/eev-g/")
# (find-gitk "/tmp/eev-g/")

export PAGER=cat
git log --oneline --graph --all -20



cd /tmp/eev-g/

# (find-fline "/tmp/eev-g/")

# (find-gitk    "/tmp/eev-g/")
# (magit-status "/tmp/eev-g/")



https://github.com/paulboone/ticgit






#####
#
# git-push
# 2018mai15
#
#####

# «git-push»  (to ".git-push")
# (find-man      "1 git-push")
# (find-gitdocfile "git-push.txt")
# (find-sh    "git help push")




#####
#
# git push.default
# 2018mai15
#
#####

# «push.default» (to ".push.default")
# (find-man "1 git-push" "push.default")
# (find-man "1 git-config" "  push.default\n")
# (find-man "1 git-config" "  push.default\n" "simple")
# (find-man "1 git-config" "  push.default\n" "matching")
# (find-man "git-config")

/tmp/eev(edrx:ve)# git push
warning: push.default is unset; its implicit value is changing in
Git 2.0 from 'matching' to 'simple'. To squelch this message
and maintain the current behavior after the default changes, use:

  git config --global push.default matching

To squelch this message and adopt the new behavior now, use:

  git config --global push.default simple

When push.default is set to 'matching', git will push local branches
to the remote branches that already exist with the same name.

In Git 2.0, Git will default to the more conservative 'simple'
behavior, which only pushes the current branch to the corresponding
remote branch that 'git pull' uses to update the current branch.

See 'git help config' and search for 'push.default' for further information.
(the 'simple' mode was introduced in Git 1.7.11. Use the similar mode
'current' instead of 'simple' if you sometimes use older versions of Git)



git config --global push.default simple
cat ~/.gitconfig




#####
#
# git ls-files
# 2018mai30
#
#####

# «git-ls-files» (to ".git-ls-files")
# (find-sh "git help ls-files")
# (find-man     "git-ls-files")
# (find-sh   "locate ls-files")
# (find-gitdocfile "git-ls-files.txt")

# (find-eevfile "")
# (find-eevsh "git ls-files")
# (find-eevsh "git ls-files -m")
# (find-angg "bin/gsub.lua")

cd ~/eev-current/
git ls-files -m
git ls-files -m | gsub.lua '.+' '(find-tkdiff "%1" "/tmp/eev/%1")'

# (find-fline "/tmp/eev/")
# (find-gitk  "/tmp/eev/")

cd /tmp/eev/




#####
#
# git checkout
# 2018mai30
#
#####

# «git-checkout» (to ".git-checkout")
# (find-sh  "git help checkout")
# (find-man      "git-checkout")
# (find-gitdoc-links "checkout")

# (find-fline "/tmp/eev/")
# (find-gitk  "/tmp/eev/")

cd /tmp/eev/
git checkout UTF-8
# (find-fline "/tmp/eev/")

git commit -a -m "Make \`find-eev-quick-intro\' and \`find-emacs-keys-intro\' more important"
git push






#####
#
# Creating branches "UTF-8" and "unibyte" in the eev repository
# 2018mai15
#
#####

# «eev-UTF-8-branch» (to ".eev-UTF-8-branch")
# https://github.com/edrx/eev.git
# (find-git-links "https://github.com/edrx/eev.git" "eev")

* (eepitch-shell)
* (eepitch-kill)
* (eepitch-shell)
rm -Rfv /tmp/eev/
cd      /tmp/
git clone https://github.com/edrx/eev.git
cd      /tmp/eev/
# (find-gitk "/tmp/eev/")

git checkout -b UTF-8
git checkout -b unibyte
(TZ=GMT date; date) > VERSION
git commit -a -m 'Several files are still unibyte/raw-text here'
git push

# (find-man "1 git-push")

git checkout UTF-8

# (find-books "__comp/__comp.el" "git-progit")



(TZ=GMT date; date) > VERSION
git commit -a -m 'Starting to convert to UTF-8'
(TZ=GMT date; date) > VERSION
git commit -a -m 'More UTF-8 changes'




#####
#
# ~/eev-current/ had a partly reverted commit; this is what I did to fix that.
# 2018mai31
#
#####

# «eev-fix-git-2018may31» (to ".eev-fix-git-2018may31")
# (find-angg ".zshrc" "my-cmp-tkdiff")

* (eepitch-shell)
* (eepitch-kill)
* (eepitch-shell)
rm -Rfv /tmp/eev
cd      /tmp/
git clone https://github.com/edrx/eev.git
cd      /tmp/eev/
git checkout UTF-8


* (eepitch-shell)
* (eepitch-kill)
* (eepitch-shell)
function my-git-list-files () { (cd $1 &&           git ls-files $*[2,-1])     }
function my-git-laf-files  () { (cd $1 &&     laf $(git ls-files $*[2,-1]))    }
function my-git-cp-files   () { (cd $1 && cp -iav $(git ls-files $*[3,-1]) $2) }
function my-tkdiff-links   () { gsub.lua '.+' '(find-tkdiff "'$1'%1" "'$2'%1")'  }
function my-cmp            () { for i in $(cat); do echo $i; cmp $1$i $2$i; done }
function my-cmp-list       () { for i in $(cat); do cmp -s $1$i $2$i || echo $i; done }
function my-cmp-tkdiff     () { my-cmp-list ${~1} ${~2} | my-tkdiff-links $1 $2 }

my-git-list-files ~/eev-current/
my-git-laf-files  ~/eev-current/

rm -Rfv /tmp/eev-local-copy/
mkdir   /tmp/eev-local-copy/
cd      /tmp/eev-local-copy/
my-git-cp-files ~/eev-current/ /tmp/eev-local-copy/
laf     /tmp/eev-local-copy/

rm -Rfv /tmp/eev-local-clone/
mkdir   /tmp/eev-local-clone/
cd      /tmp/eev-local-clone/
git clone ~/eev-current/ .
laf     /tmp/eev-local-clone/

rm -Rfv /tmp/eev-g
cd      /tmp/
git clone https://github.com/edrx/eev.git .
cd      /tmp/eev-g/
git checkout UTF-8

cd      /tmp/eev-g/
laf     /tmp/eev-g/
my-git-list-files . | my-cmp          /tmp/eev-g/  ~/eev-current/
my-git-list-files . | my-cmp-list     /tmp/eev-g/  ~/eev-current/
my-git-list-files . | my-tkdiff-links /tmp/eev-g/ "~/eev-current/"
my-git-list-files . | my-cmp-list     /tmp/eev-g/  ~/eev-current/ \
                    | my-tkdiff-links /tmp/eev-g/ "~/eev-current/"
my-git-list-files . | my-cmp-tkdiff   /tmp/eev-g/ "~/eev-current/"

my-git-list-files /tmp/eev/      | my-cmp    /tmp/eev/  ~/eev-current/
my-git-list-files ~/eev-current/ | my-cmp    /tmp/eev/  ~/eev-current/

# (find-gitk "/tmp/eev/")
# (find-gitk "~/eev-current/")

# (find-fline "~/eev-current/" ".git")
# cd ~/eev-current/
# mv -iv .git .git-old
# cp -aiv /tmp/eev/.git/ ~/eev-current/
# (find-fline "~/eev-current/" ".git")







#####
#
# What happens if I do "git clone .../eev.git" in a non-empty directory?
# 2018mai30
#
#####

# «clone-into-non-empty-dir» (to ".clone-into-non-empty-dir")

* (eepitch-shell)
* (eepitch-kill)
* (eepitch-shell)
# (find-fline "/tmp/eev0/")
rm -Rfv /tmp/eev0/
mkdir   /tmp/eev0/
mkdir   /tmp/eev0/eev/
cd      /tmp/eev0/
echo HELLO > eev/eev-codings.el
echo HELLO > eev/NEWFILE
git clone https://github.com/edrx/eev.git
cd      /tmp/eev0/eev/

# fatal: destination path 'eev' already exists and is not an empty directory.

# (find-fline "/tmp/eev0/eev/")
# (find-gitk  "/tmp/eev0/eev/")





#####
#
# git cat-file
# 2019feb09
#
#####

# «git-cat-file» (to ".git-cat-file")
# (find-gitdocfile "")
# (find-gitdocfile "git-cat-file.txt")
# (find-man "1 git-cat-file")
# (find-man "1 git-cat-file" "  -t" "type")
# (find-man "1 git-cat-file" "  -p" "Pretty-print")

* (eepitch-shell)
* (eepitch-kill)
* (eepitch-shell)
cd /tmp/eev-g/
export PAGER=cat
git log --oneline -5
git cat-file -t 22702eb
git cat-file -p 22702eb
git cat-file commit     22702eb
git cat-file tree       22702eb
git cat-file --textconv 22702eb

git cat-file tree   73f276fb1ab63e2595f695d0bdc8e51d240441b4
git cat-file commit a5f93439db021369c365b69428c52b55db1bb975

git cat-file -t HEAD
git cat-file -p HEAD
git cat-file commit HEAD
git cat-file tree HEAD

git cat-file -t UTF-8
git cat-file -p UTF-8
git cat-file -t master
git cat-file -p master

# (find-gitk "/tmp/eev-g/")
git log --oneline -30 UTF-8
git cat-file -p       UTF-8~29
git cat-file -t remotes/origin/UTF-8
git branch --list
git branch --list -a

git cat-file -t remotes/origin/unibyte
git cat-file -p remotes/origin/unibyte
git cat-file -p remotes/origin/unibyte~1
git cat-file -p remotes/origin/unibyte~2




#####
#
# git rev-parse
# 2019feb09
#
#####

# «git-rev-parse» (to ".git-rev-parse")
# (find-gitdocfile "")
# (find-gitdocfile "git-cat-file.txt")
# (find-gitdocfile "git-rev-parse.txt")

* (eepitch-shell)
* (eepitch-kill)
* (eepitch-shell)
cd /tmp/eev-g/
export PAGER=cat
git log --oneline -5
git rev-parse HEAD





#####
#
# git-show
# 2019mar05
#
#####

# «git-show» (to ".git-show")
# (find-man "1 git-show")
# (find-man "1 git-log")
# (find-man "7 gitrevisions" "<rev>:<path>")

* (eepitch-shell)
* (eepitch-kill)
* (eepitch-shell)
cd /tmp/eev-g/
export PAGER=cat
git log --oneline
git log --oneline -5
git show 92702c7:ChangeLog | tee /tmp/ChangeLog_new
git show b0f124e:ChangeLog | tee /tmp/ChangeLog_old
# (find-tkdiff "/tmp/ChangeLog_new" "/tmp/ChangeLog_old")

* (eepitch-shell)
* (eepitch-kill)
* (eepitch-shell)
# (find-es "git" "git-animations")
. ~/bin/git-defs         # (find-angg "bin/git-defs")
rm -Rf   /tmp/git/here/
mkdir -p /tmp/git/here/
cd       /tmp/git/here/
git init
Modify a b; git add a b; Commit
Diagram
Modify a; Commit
Modify b; Commit
git show --format=oneline HEAD
git show --oneline HEAD
git log --oneline -1
git log --oneline -1 6ae58fb
git log --oneline -1 6ae58fb^1
git log --oneline -1 HEAD
git log --oneline -1 HEAD^1
git log --oneline -1 HEAD^^
git tag FOO
Diagram

git show HEAD
git show HEAD:a
git show HEAD^^:a

# (find-gitk "/tmp/git/here/")
# (find-man "1 git-show")




#####
#
# git-show-eev
# 2021oct09
#
#####

# «git-show-eev»  (to ".git-show-eev")

* (eepitch-shell)
* (eepitch-kill)
* (eepitch-shell)
rm -Rfv /tmp/eev-g
mkdir   /tmp/eev-g/
cd      /tmp/eev-g/ && git clone https://github.com/edrx/eev.git .
cd      /tmp/eev-g/

export PAGER=cat
git log --oneline --graph --all -20

git show                  HEAD |& tee /tmp/og
git show --format=oneline HEAD |& tee /tmp/ogo
tkdiff /tmp/og /tmp/ogo

# (find-gitk  "/tmp/eev-g/")
# (find-fline "/tmp/eev-g/")

# (code-c-d "eevg" "/tmp/eev-g/")
# (find-eevgfile "")
# (find-man "1 git-show")
# (find-man "1 git-show" "-s, --no-patch")
# (find-man "1 git-log")
# (find-eevgsh "git show    HEAD")
# (find-eevgsh "git show -s HEAD")
# (find-eevgsh "git show    HEAD | head -n 5")
# (find-eevgsh "git show    HEAD~10 | head -n 5")
# (find-eevgsh "git show -s HEAD~10")
# (find-eevgsh "git show    --format=oneline HEAD")
# (find-eevgsh "git show -s --format=oneline HEAD")

# (find-man "head")

git show HEAD
git show --format=oneline HEAD

"git show HEAD" and "git show --format=oneline HEAD"




#####
#
# find-git-shows
# 2023dec24
#
#####

# «find-git-shows»  (to ".find-git-shows")
# (find-angg ".emacs" "find-git-shows")

;; (find-git-shows  "/tmp/eev-g/" "UTF-8:eev-kl-here.el" "master:eev-kl-here.el")
;; (find-git-shows4 "/tmp/eev-g/" "UTF-8:" "master:" "eev-kl-here.el")
;; (find-git-shows4 "/tmp/eev-g/" "UTF-8:" "master:" "VERSION")

(defun find-git-shows (dir file1 file2)
  (find-2a `(find-sh-at-dir dir ,(format "git show %s" file1))
           `(find-sh-at-dir dir ,(format "git show %s" file2))))

(defun find-git-shows4 (dir prefix1 prefix2 suffix)
  (find-git-shows dir (concat prefix1 suffix) (concat prefix2 suffix)))






#####
#
# mergetool
# 2019mar10
#
#####

# «mergetool» (to ".mergetool")
# https://emacsformacosx.com/tips



#####
#
# gitlab
# 2019mar18
#
#####

# «gitlab» (to ".gitlab")
# http://lists.gnu.org/archive/html/emacs-devel/2019-03/msg00531.html
# https://emba.gnu.org/help
# https://about.gitlab.com/



#####
#
# git-add and git-rm
# 2019apr01
#
#####

# «git-add» (to ".git-add")
# (find-man "1 git-add")
# (find-man "1 git-add" "-n, --dry-run")
# (find-man "1 git-rm")




#####
#
# git-submodule
# 2019jun06
#
#####

# «git-submodule» (to ".git-submodule")
# (find-man "git-submodule")




#####
#
# git-describe
# 2019jun15
#
#####

# «git-describe» (to ".git-describe")
# (find-man "1 git-describe")
# (find-man "1 git-tag")
# (find-es "eev" "push-master")

* (eepitch-shell)
* (eepitch-kill)
* (eepitch-shell)
cd /tmp/eev-c/
git checkout UTF-8

git describe UTF-8
git describe HEAD
git describe master

export PAGER=cat
git log --oneline --graph --decorate --all --date-order
git log --oneline --graph --decorate --all --date-order
git log
git log --oneline
git log --oneline --graph
git log --oneline --graph --all
git log --oneline --graph --all -5
git log --oneline --graph --all -20




#####
#
# "Branch UTF-8 set up to track remote branch UTF-8 from origin."
# 2019jun22
#
#####

# «tracking» (to ".tracking")
# (find-es "eev" "push-master")
# (find-gitdocgrep "grep --color -niH -e track *.txt")
# (find-gitdocfile "config.txt" "[branch \"devel\"]")
# (find-man "1 git-config")
# (find-man "1 git-config" "[branch \"devel\"]")
# (find-fline "/tmp/eev-g/.git/config")



#####
#
# pull-request
# 2019jun19
#
#####

# «pull-request» (to ".pull-request")
# https://yangsu.github.io/pull-request-tutorial/
# https://help.github.com/en/articles/about-pull-requests




#####
#
# Commits with long explanations / messages
# 2019aug11
#
#####

# «commit-long» (to ".commit-long")
# https://github.com/lua/lua/commit/e8c779736f3029df353038352c14c8ab63728811




#####
#
# git-rebase
# 2019sep12 / 2021oct17
#
#####

# «git-rebase» (to ".git-rebase")
# (find-man "git-rebase")
# https://medium.com/@fredrikmorken/why-you-should-stop-using-git-rebase-5552bee4fed1

hint: Pulling without specifying how to reconcile divergent branches is
hint: discouraged. You can squelch this message by running one of the following
hint: commands sometime before your next pull:
hint: 
hint:   git config pull.rebase false  # merge (the default strategy)
hint:   git config pull.rebase true   # rebase
hint:   git config pull.ff only       # fast-forward only
hint: 
hint: You can replace "git config" with "git config --global" to set a default
hint: preference for all repositories. You can also pass --rebase, --no-rebase,
hint: or --ff-only on the command line to override the configured default per
hint: invocation.

# (find-angg ".gitconfig")
# (find-man "1 git-config")
git config --global pull.rebase false




#####
#
# github-theme-minimal
# 2019sep25
#
#####

# «github-theme-minimal» (to ".github-theme-minimal")
# https://strace.io
# https://github.com/orderedlist/minimal



#####
#
# git-tag
# 2019oct06
#
#####

# «git-tag» (to ".git-tag")
# (find-gitdoc-links "tag")
# (find-man    "1 git-tag")
# (find-gitdoc-links "checkout")
# (find-man    "1 git-checkout")
# (find-man    "1 git-checkout" "git checkout --detach")
# (find-books "__comp/__comp.el" "git-progit2")
# (find-progit2page (+ 5 54) "Tagging")
# (find-eevgit "eevgitlib1.sh")
# (find-git-intro)
# (find-git-intro "2. A first test")

* (eepitch-bash)
* (eepitch-kill)
* (eepitch-bash)
rm -Rfv   /tmp/eevgit-repo-s/
mkdir     /tmp/eevgit-repo-s/
cd        /tmp/eevgit-repo-s/
git init --bare

# Create a first "developer" repository in /tmp/eevgit-repo-1/
rm -Rfv   /tmp/eevgit-repo-1/
mkdir     /tmp/eevgit-repo-1/
cd        /tmp/eevgit-repo-1/
git clone /tmp/eevgit-repo-s/ .

.         ~/GIT/eevgitlib1.sh
git init
Modify file1; git add file1; Commit A
Modify file1;                Commit B
Modify file1;                Commit C; git tag TC
Modify file1;                Commit D
Modify file1;                Commit E
Diagram

# (find-gitk "/tmp/eevgit-repo-1/")

git push

# Create a second "developer" repository in /tmp/eevgit-repo-2/
rm -Rfv   /tmp/eevgit-repo-2/
mkdir     /tmp/eevgit-repo-2/
cd        /tmp/eevgit-repo-2/
git clone /tmp/eevgit-repo-s/ .

# (find-gitk "/tmp/eevgit-repo-2/")





#####
#
# git-tag-eev-unibyte
# 2024jan28
#
#####

# «git-tag-eev-unibyte»  (to ".git-tag-eev-unibyte")

# (find-eev2-links)
# (find-eev2-links 2 "git log")

* (eepitch-shell)
* (eepitch-kill)
* (eepitch-shell)
rm -Rfv /tmp/eev-g
mkdir   /tmp/eev-g/
cd      /tmp/eev-g/ && git clone https://github.com/edrx/eev.git .
cd      /tmp/eev-g/
git checkout UTF-8

git checkout unibyte
PAGER=cat git log --oneline
git log
git tag unibyte
git tag

git checkout UTF-8
git merge unibyte

# (find-man "1 git-merge")
# (find-man "1 git-merge" "merge commit")

git branch --list -a
git for-each-ref
PAGER=cat git log --oneline --graph --all -20

# (find-gitk  "/tmp/eev-g/")

PAGER=cat git log --oneline --graph --all -20

my-git-list-files /tmp/eev-g/ | my-cmp-tkdiff "~/eev-current/" /tmp/eev-g/

git log dc5e6c5e7eb3d53da5ab64918f3fd97dba1309a4





#####
#
# visual-merge
# 2019oct07
#
#####

# «visual-merge» (to ".visual-merge")
# https://stackoverflow.com/questions/137102/whats-the-best-visual-merge-tool-for-git
# https://www.perforce.com/products/helix-core-apps/merge-diff-tool-p4merge




#####
#
# diffuse
# 2019oct07
#
#####

# «diffuse» (to ".diffuse")
# (find-status   "diffuse")
# (find-vldifile "diffuse.list")
# (find-udfile   "diffuse/")

# http://diffuse.sourceforge.net/
# https://sourceforge.net/projects/diffuse/files/diffuse/0.4.8/diffuse-0.4.8.tar.bz2/download
# https://sourceforge.net/projects/diffuse/files/diffuse/0.4.8/diffuse-0.4.8.tar.bz2
# http://diffuse.sourceforge.net/development.html

* (eepitch-shell)
* (eepitch-kill)
* (eepitch-shell)
rm -Rv ~/usrc/diffuse-0.4.8/
mkdir  ~/usrc/diffuse-0.4.8/
tar -C ~/usrc/ \
  -xvjf $S/https/sourceforge.net/projects/diffuse/files/diffuse/0.4.8/diffuse-0.4.8.tar.bz2
cd     ~/usrc/diffuse-0.4.8/

# (find-fline "~/usrc/diffuse-0.4.8/")
# (code-c-d "diffuse" "~/usrc/diffuse-0.4.8/")
# (find-diffusefile "")
# (find-diffusefile "src/usr/bin/diffuse")




#####
#
# kdiff3
# 2019oct07
#
#####

# «kdiff3» (to ".kdiff3")
# (find-status   "kdiff3")
# (find-vldifile "kdiff3.list")
# (find-udfile   "kdiff3/")



#####
#
# meld
# 2019oct06
#
#####

# «meld» (to ".meld")
# (find-status   "meld")
# (find-vldifile "meld.list")
# (find-udfile   "meld/")
# http://meldmerge.org/




#####
#
# Kévin Le Gouguec's messages on emacs-devel about cloning local repos in tests
# 2019nov28
#
#####

# «klg-cloning-local-repo» (to ".klg-cloning-local-repo")
# https://lists.gnu.org/archive/html/emacs-devel/2019-11/msg01048.html 
# https://lists.gnu.org/archive/html/emacs-devel/2019-11/threads.html#01048
# https://github.com/peniblec
# https://gitlab.com/peniblec/memory-leaks/

* (eepitch-shell)
* (eepitch-kill)
* (eepitch-shell)
cd /tmp/
rm -Rfv server-hosted-repo
rm -Rfv hacker-repo
rm -Rfv hacker2-repo

git init --bare server-hosted-repo
git clone server-hosted-repo hacker-repo

cd hacker-repo/
echo "foo" > README
git add README ; git commit -m "Add README" 
git push --set-upstream ../server-hosted-repo/ master

cd ..
git clone server-hosted-repo hacker2-repo

cd hacker2-repo
echo foobaz > README 
git commit -m "Change to foobaz" -- README
git push --set-upstream ../server-hosted-repo/ master

cd ../hacker-repo
echo foobar > README
git commit -m "Change to foobar" -- README





#####
#
# common-ancestor
# 2020jan02
#
#####

# «common-ancestor» (to ".common-ancestor")
# https://stackoverflow.com/questions/1549146/git-find-the-most-recent-common-ancestor-of-two-branches
# (find-man "1 git-merge-base")

git merge-base branch2 branch3




#####
#
# distance-between-commits
# 2020jan02
#
#####

# «distance-between-commits» (to ".distance-between-commits")
# https://stackoverflow.com/questions/31997999/number-of-commits-between-two-commitishes
# https://dev.to/espoir/how-to-count-the-number-of-commits-made-between-2-commits-hashes-1aoa



#####
#
# fast-forward
# 2020oct05
#
#####

# «fast-forward»  (to ".fast-forward")
# https://mail.google.com/mail/ca/u/0/#search/from%3Amonnier/KtbxLxgNLCDRlFxFBfWbvxRTRLFMhnGqZL
# (find-gitdocgrep "grep --color -nH -e 'fast-forward' *.txt")
# (find-gitdocfile "glossary-content.txt" "fast-forward::")






#####
#
# Building the tree of the "illustration, by Jon Loeliger" - and asking for help
# 2020oct04
#
#####

# «test-2020oct04»  (to ".test-2020oct04")
# (find-git-intro)
# (code-c-d "gitdoc" "/usr/share/doc/git-doc/")
# (find-gitdocgrep "grep --color -nH -e 'SPECIFYING REVISIONS' *.txt")
# (find-gitdocfile "")
# (find-gitdocfile "revisions.txt")
# (find-gitdocfile "revisions.txt" "SPECIFYING RANGES")
# (find-gitdocfile "revisions.txt" "illustration, by Jon Loeliger")
# (find-gitdocfile "revisions.txt" "'<sha1>'")
# (find-gitdocfile "revisions.txt" "'<describeOutput>'")
# (find-gitdocfile "revisions.txt" "'<refname>'")
# (find-gitdocfile "revisions.txt" "Both commit nodes B" "and C are parents")
#
# G   H   I   J
#  \ /     \ /
#   D   E   F
#    \  |  / \
#     \ | /   |
#      \|/    |
#       B     C
#        \   /
#         \ /
#          A

* (eepitch-shell)
* (eepitch-kill)
* (eepitch-shell)
# Preparation:

rm -Rfv /tmp/git-test/
mkdir   /tmp/git-test/
cd      /tmp/git-test/
#    http://angg.twu.net/bin/git-defs.html
wget http://angg.twu.net/bin/git-defs

* (eepitch-shell)
* (eepitch-kill)
* (eepitch-shell)
rm -Rfv /tmp/git-test/repo1/
mkdir   /tmp/git-test/repo1/
cd      /tmp/git-test/repo1/
.       /tmp/git-test/git-defs
# (find-fline "/tmp/git-test/git-defs")

git init

Modify  file1 file2
git add file1 file2
Commit               A
Modify  file2 file1
Commit               B
Diagram

Log1 HEAD
Log1 HEAD^
git checkout HEAD^
git checkout -b br1
Modify file1
Commit               C

# (find-gitk "/tmp/git-test/repo1/")

Diagram
Modify file1
Commit               C


git merge -s ours -m D master
Diagram
Log1 HEAD^
Log1 HEAD^1
Log1 HEAD^2
git show HEAD:a
git show HEAD^1:a
git show HEAD^2:a

# (find-gitk "/tmp/git-test/repo1/")








#####
#
# test-2020oct13
# 2020oct13
#
#####

# «test-2020oct13»  (to ".test-2020oct13")
# (find-git-intro "2. A first repository")
# (find-books "__comp/__comp.el" "git-internals")
# (find-gitinternalspage  28 "Branching and Merging")
# (find-gitinternalstext  28 "Branching and Merging")
# (find-gitinternalspage 111 "Commands Overview")

* (eepitch-shell)
* (eepitch-kill)
* (eepitch-shell)
rm -Rfv /tmp/git-test/
mkdir   /tmp/git-test/
cd      /tmp/git-test/
#    http://angg.twu.net/bin/git-defs.html
wget http://angg.twu.net/bin/git-defs

* (eepitch-shell)
* (eepitch-kill)
* (eepitch-shell)
rm -Rfv /tmp/git-test/repo1/
mkdir   /tmp/git-test/repo1/
cd      /tmp/git-test/repo1/
.       /tmp/git-test/git-defs
# (find-fline "/tmp/git-test/git-defs")

git init
Modify file1; Modify file2; git add file1 file2
              Commit A; git branch brAC
Modify file1; Commit B; git branch brBDG
git checkout brAC
Modify file1; Commit C
git checkout brBDG
Modify file1; Commit D
git checkout HEAD^ -b brE
Modify file1; Commit E
git checkout HEAD^
git merge -s ours brAC -m F
git branch brFI
git checkout brBDG
Modify file1; Commit G
git checkout HEAD^ -b brH
Modify file1; Commit H
git checkout brFI
Modify file1; Commit I
git checkout HEAD^ -b brJ
Modify file1; Commit J

Diagram

# (find-gitk "/tmp/git-test/repo1/")
# (find-gitdocfile "revisions.txt" "illustration, by Jon Loeliger")
#
#                 I,brFI  J,brJ
#                    |   /
#  G,brBDG   H,brH   |  /
#         \ /        | /
#          D  E,brE  F
#           \   |   / \
#            \  |  /   |
#             \ | /    |
#               B    C,brAC
#                \    /
#                 \  /
#                  A

# (find-man "git-merge")




#####
#
# staging
# 2020oct28
#
#####

# «staging»  (to ".staging")
# (find-gitinternalspage 49 "staging area")
# (find-gitinternalstext 49 "staging area")
# (find-gitinternalspage 58 "not staged")
# (find-gitinternalstext 58 "not staged")




#####
#
# git-blame
# 2020oct28
#
#####

# «git-blame»  (to ".git-blame")
# (find-man "1 git-blame")
# https://stackoverflow.com/questions/31203001/what-does-git-blame-do
# https://www.atlassian.com/git/tutorials/inspecting-a-repository/git-blame

* (eepitch-shell)
* (eepitch-kill)
* (eepitch-shell)
cd      ~/usrc/lualibs/
export PAGER=cat
git blame
git blame lualibs-package.lua
git log lualibs-package.lua
git log --oneline lualibs-package.lua

# (find-lualibsfile "")
# (find-lualibsfile "lualibs-package.lua")
# (find-lualibssh "git blame")
# (find-lualibssh "git blame lualibs-package.lua")
# (find-lualibssh "git blame -f lualibs-package.lua")
# (find-lualibssh "git blame -n lualibs-package.lua")
# (find-lualibssh "git log --help")

# (find-man "1 git-log")
# (find-man "1 git-log" "--diff-filter=")
# (find-man "1 git-log" "git log v2.6.12.. include/scsi drivers/scsi")
# (find-man "1 git-show")




#####
#
# git-worktree
# 2020dec09
#
#####

# «git-worktree»            (to ".git-worktree")
# «multiple-working-trees»  (to ".multiple-working-trees")
# (find-man "1 git-worktree")
# https://lists.gnu.org/archive/html/emacs-devel/2020-12/msg00512.html
# (find-fline "~/LOGS/2022nov20.emacs" "multiple working trees")

bash5$ du -sch busybox-{A,B,C}
58M	busybox-A
19M	busybox-B
19M	busybox-C
95M	total
bash5$ du -sch busybox-{A,B,C}/.git
40M	busybox-A/.git
376K	busybox-B/.git
388K	busybox-C/.git
40M	total

<twb> ^ you can see even if you just clone locally, you don't
      really pay any cost for the "extra" .git




#####
#
# renaming-files
# 2020dec17
#
#####

# «renaming-files»  (to ".renaming-files")
# (find-books "__comp/__comp.el" "git-progit2")
# (find-progit2page (+ 6 38) "Moving Files")
# (find-progit2text (+ 6 38) "Moving Files")
# (find-man "git-mv")



#####
#
# tracking-branches
# 2021jan02
#
#####

# «tracking-branches»  (to ".tracking-branches")
# (find-books "__comp/__comp.el" "git-progit2")
# (find-progit2page (+ 6 54) "tracking branch")
# (find-progit2text (+ 6 54) "tracking branch")




#####
#
# John Wiegley's "Git from the bottom up"
# 2021jan10
#
#####

# «git-bottom-up»  (to ".git-bottom-up")
# http://jwiegley.github.io/git-from-the-bottom-up/
# https://github.com/jwiegley/git-from-the-bottom-up
# (find-git-links "https://github.com/jwiegley/git-from-the-bottom-up" "wiegleygit")
# (code-c-d "wiegleygit" "~/usrc/git-from-the-bottom-up/")
# (find-wiegleygitfile "")

# https://github.com/johnrezzo/git-from-the-bottom-up-ebook

;; http://ftp.newartisans.com/pub/git.from.bottom.up.pdf
(code-pdf-page "wiegleygit" "$S/http/ftp.newartisans.com/pub/git.from.bottom.up.pdf")
(code-pdf-text "wiegleygit" "$S/http/ftp.newartisans.com/pub/git.from.bottom.up.pdf")
;; (find-wiegleygitpage)
;; (find-wiegleygittext)
;; (find-wiegleygitpage  2 "1. License")
;; (find-wiegleygitpage  3 "2. Introduction")
;; (find-wiegleygitpage  5 "3. Repository: Directory content tracking")
;; (find-wiegleygitpage  6   "Introducing the blob")
;; (find-wiegleygitpage  7   "Blobs are stored in trees")
;; (find-wiegleygitpage  8   "How trees are made")
;; (find-wiegleygitpage 10   "The beauty of commits")
;; (find-wiegleygitpage 12   "A commit by any other name...")
;; (find-wiegleygitpage 15   "Branching and the power of rebase")
;; (find-wiegleygitpage 20 "4. The Index: Meet the middle man")
;; (find-wiegleygitpage 22   "Taking the index farther")
;; (find-wiegleygitpage 24 "5. To reset, or not to reset")
;; (find-wiegleygitpage 24   "Doing a mixed reset")
;; (find-wiegleygitpage 24   "Doing a so reset")
;; (find-wiegleygitpage 25   "Doing a hard reset")
;; (find-wiegleygitpage 27 "6. Last links in the chain: Stashing and the reflog")
;; (find-wiegleygitpage 30 "7. Conclusion")
;; (find-wiegleygitpage 31 "8. Further reading")






#####
#
# adding-collaborator
# 2021feb10
#
#####

# «adding-collaborator»  (to ".adding-collaborator")

https://github.com/edrx/org-eev-sympy-tests/settings
  -> Manage access
  -> Invite collaborator

https://github.com/edrx/org-eev-sympy-tests/settings/access




#####
#
# git-format-patch
# 2021feb27
#
#####

# «git-format-patch»  (to ".git-format-patch")
# https://mail.google.com/mail/ca/u/0/#search/from%3Atomas/FMfcgxwLsSVFfKQkqVpPdMVjWxvvMJfm
# (find-gitdoc-links "format-patch")
# (find-gitdoc-links "am")
# (find-gitdoc-links "mailinfo")
# (find-man "1 git-format-patch")
# (find-man "1 git-am")
# (find-man "7 gitrevisions" "@{u}")
# (find-man "1 git-mailinfo")
# (find-man "1 git-mailinfo" "  --scissors")

* (eepitch-shell)
* (eepitch-kill)
* (eepitch-shell)
cd ~/mr/eev
git format-patch @{u}
cd /tmp
git clone https://github.com/edrx/eev.git
cd /tmp/eev
git am ~/mr/eev/0001-use-utf8-instead-of-latin1-in-pdftotext.patch
git log -p | head -n 25




#####
#
# git format-patch: instructions in depp.brause.cc
# 2024sep22
#
#####

# «git-format-patch-2»  (to ".git-format-patch-2")
# https://depp.brause.cc/faq.html

$ git clone https://depp.brause.cc/<repo>.git && cd <repo>
$ vi stuff
$ git add stuff
$ git commit -m "Fix stuff"
$ git format-patch HEAD^1
0001-Fix-stuff.patch




#####
#
# git-bisect
# 2021jun19
#
#####

# «git-bisect»  (to ".git-bisect")
# (find-man "1 git-bisect")
# https://git-scm.com/docs/git-bisect

* (eepitch-shell)
* (eepitch-kill)
* (eepitch-shell)
cd ~/bigsrc/emacs28/



#####
#
# git-bisect-by-hand
# 2021oct09
#
#####

# «git-bisect-by-hand»  (to ".git-bisect-by-hand")
# (find-angg ".emacs.templates" "find-emacs28-bisect-by-hand-links")
# (find-angg ".zshrc" "emacs28_")
# (find-fline "~/LOGS/2021oct09.emacs" "by hand")
# (find-fline "~/LOGS/2024jul20.emacs" "--without-all and then --with-whatever")

* (eepitch-shell)
* (eepitch-kill)
* (eepitch-shell)
# (find-es "git" "git-show-format")
# (find-es "git" "git-show-format" "gsh ()")
gsh () { git show -s --date=format:'%Y-%m-%d %k:%M:%S' --format='%h %ad %s' $* }

cd ~/bigsrc/emacs/
for i in $(seq 0 1000); do echo "HEAD~$i: $(gsh HEAD~$i)"; done  |& tee /tmp/oegsh

# (find-fline "/tmp/oegsh")

# (find-emacs28-bisect-by-hand-links "512")
#       (find-fline "~/bigsrc/emacs28_512/om" "Error 2")
# (find-emacs28-bisect-by-hand-links "256")
# (find-emacs28-bisect-by-hand-links "128")




#####
#
# Connecting to github with ssh
# 2021jul20
#
#####

# «github-with-ssh»  (to ".github-with-ssh")
# https://stackoverflow.com/questions/12940626/github-error-message-permission-denied-publickey
# https://docs.github.com/en/github/authenticating-to-github/connecting-to-github-with-ssh/
# https://docs.github.com/en/github/authenticating-to-github/connecting-to-github-with-ssh/testing-your-ssh-connection

* (eepitch-shell)
* (eepitch-kill)
* (eepitch-shell)
ssh -T git@github.com
# Attempts to ssh to GitHub

ssh-add -l -E sha256

ssh-keygen -t ed25519 -C "eduardoochs@gmail.com"
        ssh-agent -s
eval "$(ssh-agent -s)"
ssh-add ~/.ssh/id_ed25519

ls -al ~/.ssh/
# (find-fline "~/.ssh/")
# (find-fline "~/.ssh/id_ed25519.pub")

gh ssh-key add ~/.ssh/id_ed25519.pub
gh auth login
gh ssh-key add ~/.ssh/id_ed25519.pub
gh auth refresh -s write:public_key
gh ssh-key add ~/.ssh/id_ed25519.pub




#####
#
# github-cli
# 2021jul21
#
#####

# «github-cli»  (to ".github-cli")
# https://cli.github.com/
# https://github.com/cli/cli/blob/trunk/docs/install_linux.md

* (eepitch-shell)
* (eepitch-kill)
* (eepitch-shell)
cd /tmp/

curl -fsSL https://cli.github.com/packages/githubcli-archive-keyring.gpg | sudo gpg --dearmor -o /usr/share/keyrings/githubcli-archive-keyring.gpg
echo "deb [arch=$(dpkg --print-architecture) signed-by=/usr/share/keyrings/githubcli-archive-keyring.gpg] https://cli.github.com/packages stable main" | sudo tee /etc/apt/sources.list.d/github-cli.list > /dev/null
sudo apt update
sudo apt install gh

# (find-status   "gh")
# (find-vldifile "gh.list")
# (find-udfile   "gh/")




#####
#
# Finding in which commit a function was renamed
# 2021oct03
#
#####

# «when-renamed»  (to ".when-renamed")
# (find-git-links "https://gitlab.com/willvaughn/emacs-0x0" "emacs0x0")
# (find-gitk           "~/usrc/emacs-0x0/")
# (code-c-d "emacs0x0" "~/usrc/emacs-0x0/")
# (find-emacs0x0file "")
# (find-emacs0x0file "0x0.el" "(defun 0x0-upload-kill-ring")
# (find-emacs0x0file "0x0.el" "(defun 0x0-upload-text")
# (find-efunction 'ee-0x0-upload-region)

# (find-es "git" "git-log-difftool")
# (find-man "7 gitrevisions")
# (find-man "7 gitrevisions" "master~3")
# (find-man "1 git-show")
# (find-man "1 git-log")
# (find-man "1 git-log" "-G<regex>")
# (find-fline "~/LOGS/2021oct03.emacs" "git log -G")

* (eepitch-shell)
* (eepitch-kill)
* (eepitch-shell)

cd ~/usrc/emacs-0x0/
export PAGER=cat
git difftool --tool-help

git log --oneline 0x0.el
git log --date=format:%Y-%m-%d --format="%h %ad %s" 0x0.el
git difftool -y --tool=tkdiff ad9f84e 771e2e3 0x0.el
git difftool -y --tool=tkdiff HEAD~9 HEAD~10 0x0.el
git log -G 'defun 0x0-upload' -p
git log -G 'defun 0x0-upload ' -p

for i in $(seq 0 68); do
  echo $i
  git show HEAD~$i:0x0.el | grep "defun 0x0-upload "
done
git-show-my HEAD~9
git-show-my HEAD~10

# (find-emacs0x0sh "git show    HEAD~9:0x0.el")
# (find-emacs0x0sh "git show   HEAD~10:0x0.el")
# (find-emacs0x0sh "git show ac01b55fa:0x0.el")
# (find-emacs0x0sh "git show ac01b55fa:0x0.el" "defun 0x0-upload")
# (find-emacs0x0sh "git show a613afa08:0x0.el")
# (find-emacs0x0sh "git show a613afa08:0x0.el" "defun 0x0-upload")
# (find-emacs0x0sh "git log HEAD~9")
# (find-emacs0x0sh "git log HEAD~10")


ac01b55fa
a613afa08





#####
#
# gollum-wiki
# 2021oct04
#
#####

# «gollum-wiki»  (to ".gollum-wiki")
# https://github.com/gollum/gollum



#####
#
# Ugit - DIY Git in Python
# 2021oct04
#
#####

# «ugit»  (to ".ugit")
# https://news.ycombinator.com/item?id=28735425 Ugit - DIY Git in Python (leshenko.net)
# https://git.sr.ht/~sircmpwn/shit




#####
#
# ccache
# 2022aug17
#
#####

# «ccache»  (to ".ccache")
# (find-fline "~/LOGS/2022aug17.emacs" "git bisect start")
# (find-fline "~/LOGS/2022aug17.emacs" "<sam_> edrx: ccache is")



#####
#
# topics
# 2022oct02
#
#####

# «topics»  (to ".topics")
# https://github.com/topics/maxima-cas
# https://docs.github.com/en/repositories/managing-your-repositorys-settings-and-features/customizing-your-repository/classifying-your-repository-with-topics
# (find-maximamsg "37715943 202210 02" "BWillis: long link")
# (find-maximamsg "37715889 202210 02" "RDodier: topics")



#####
#
# delete-repository
# 2023dec18
#
#####

# «delete-repository»  (to ".delete-repository")
# https://docs.github.com/en/repositories/creating-and-managing-repositories/deleting-a-repository



#####
#
# loeliger-tikz-1
# 2023dec29
#
#####

# «loeliger-tikz-1»  (to ".loeliger-tikz-1")
# (find-gitdocfile "revisions.txt" "illustration, by Jon Loeliger")
# (find-es "tikz" "tut-child")
# (find-es "tikz" "tut-petri-nets-naming")
# (find-tikzmanpage 219 "Specifying the location of the node")
# (find-tikzmantext 219 "Specifying the location of the node")

* (show2-use "/tmp/Show2.tex")
* (eepitch-lua51)
* (eepitch-kill)
* (eepitch-lua51)
loadtikz2()   -- (find-angg "LUA/Tikz2.lua")
tikzbody = [[
  \draw[thick,rounded corners=8pt]
  (0,0) -- (0,2) -- (1,3.25) -- (2,2) -- (2,0) -- (0,2) -- (2,2) -- (0,0) -- (2,0);
]]

tikzbody = [[
  \node {A}
    child {node {AA}}
    child {node {AB}
      child {node {ABA}}
      child {node {ABB}}
    };
]]

tikzbody = [[
  [commit/.style={circle,fill=yellow,draw=gray}]
  \node at (3,0) [circle,fill=yellow,draw=gray] {A};
  \node at (2,1) [commit] {B};
]]

tikzbody = Dang.from [=[
  [place/.style={circle,draw=blue!50,fill=blue!20,thick,
                 inner sep=0pt,minimum size=6mm},
   transition/.style={rectangle,draw=black!50,fill=black!20,thick,
                      inner sep=0pt,minimum size=4mm}]
  \node at ( 0,2) [place] {};
  \node at ( 0,1) [place] {};
  \node at ( 0,0) [place] {};
  \node at ( 1,1) [transition] {};
  \node at (-1,1) [transition] {};
]=]

= show00()
= show0()
= show()
* (etv)

= Show.log
= Show.bigstr





#####
#
# undo-commit
# 2024sep01
#
#####

# «undo-commit»  (to ".undo-commit")
# https://alexharri.com/snippets/git/undo-commit

To undo a recent local commit, run the following:

  git reset HEAD~

Avoid undoing local commits if they have been pushed.




#####
#
# masscollabs
# 2024sep15
#
#####

# «masscollabs»  (to ".masscollabs")
# https://source.masscollabs.xyz/ edrx S29+
# (find-fline "~/LOGS/hwpplayer1")

https://flathub.org/apps/com.belmoussaoui.Authenticator
https://f-droid.org/en/packages/com.beemdevelopment.aegis/






https://news.ycombinator.com/item?id=30311713 Git in one image (githubusercontent.com)
https://raw.githubusercontent.com/JannikArndt/git-in-one-image/master/git-in-one-image.svg
https://www.youtube.com/watch?v=bSA91XTzeuA




<spikemaster> not sure the commands. but emacs function vc-annotate
              (C-x v g) may be useful.
<edrx> wrycode, spikemaster: thanks! looking!
<spikemaster> vc-annotate allows all sorts of ways to drill down.
              while in hte spell buffer press (C-h m) to see the
              keybinds. The "a" keybind can be pretty neat









# http://askubuntu.com/questions/27677/cannot-find-install-sh-install-sh-or-shtool-in-ac-aux
# http://sourceware.org/autobook/autobook/autobook_toc.html#SEC_Contents

# (find-freenode "#git")
# https://gitirc.eu/bot/trigger.php
# (find-udfile "git-doc/")
# (find-udfile "git-doc/git-ls-files.txt")
# (find-udfile "git-doc/git-ls-tree.txt")
# (find-udfile "git-doc/" "cmds-")
# (find-udfile "git-doc/cmds-plumbinginterrogators.txt")
# (find-man "1 git-init")
# (find-man "1 git-add")
# (find-man "1 git-commit" "-m <msg>,")
# (find-man "1 git-checkout" "-b\n")

git archive --format=tar --prefix=loopa-0.0.4/ v0.0.4 | gzip > ~/Desktop/loopa-0.0.4.tar.gz
 
http://savannah.gnu.org/maintenance/UsingGit

Or just publish a read-only, static HTTP mirror without any prior history ,
and from then on mind the comments.
       git clone --mirror --depth=1
Then from a cronjob run
       cd http-repo && git fetch && git --bare update-server-info

https://stackoverflow.com/questions/7230820/skip-git-commit-hooks
https://github.com/blog/1302-goodbye-uploads
https://sanctum.geek.nz/why-not-github.html
https://guides.github.com/activities/hello-world/
https://gitlab.com/monnier/bugit
https://lists.gnu.org/archive/html/emacs-devel/2019-04/msg01061.html gitlab
http://who-t.blogspot.com/2009/12/on-commit-messages.html

https://www.youtube.com/watch?v=ZDR433b0HJY
Introduction to Git with Scott Chacon of GitHub

gitref.org

https://emacsninja.com/posts/farewell-github.html

https://github.com/0branch?tab=stars

https://github.blog/2020-12-15-token-authentication-requirements-for-git-operations/
https://docs.github.com/en/free-pro-team@latest/github/authenticating-to-github/creating-a-personal-access-token

https://blog.ffwll.ch/2017/08/github-why-cant-host-the-kernel.html


https://news.ycombinator.com/item?id=28549652 Version control without Git (itoshkov.github.io) ***
https://news.ycombinator.com/item?id=28575524 Git Commands Explained with Cats (2017) (girliemac.com)
https://news.ycombinator.com/item?id=28584422 The Elements of Git (cuddly-octo-palm-tree.com)
https://news.ycombinator.com/item?id=28578896 Visual Git Cheat Sheet (ndpsoftware.com) ***
http://www.ndpsoftware.com/git-cheatsheet.html#loc=workspace;
https://wizardzines.com/git-cheat-sheet.pdf
https://news.ycombinator.com/item?id=40486197 Git cheat sheet [pdf] (wizardzines.com)

https://gameoftrees.org/index.html got

https://www.freecodecamp.org/news/why-you-should-not-use-feature-branches-a86950126124/
https://www.youtube.com/watch?v=ewn8DBJ-Viw

https://news.ycombinator.com/item?id=29756272 Ask HN: Do we need an easier Git?

https://stackoverflow.com/questions/3689838/whats-the-difference-between-head-working-tree-and-index-in-git
https://www.youtube.com/watch?v=3mOVK0oSH2M
https://git-man-page-generator.lokaltog.net/#ZWR1Y2F0ZSQkdGFnIG9iamVjdA==

https://news.ycombinator.com/item?id=30647047 Pull Request File Tree Feedback (github.com/github) - press period ***
https://www.gnu.org/software/repo-criteria-evaluation.en.html
https://www.atlassian.com/git/tutorials/git-subtree
https://initialcommit.com/blog/git-sim
https://myme.no/posts/2023-01-22-git-commands-you-do-not-need.html
https://news.ycombinator.com/item?id=34477976 Git-sim: Visually simulate Git operations in your own repos (initialcommit.com)
https://news.ycombinator.com/item?id=35371469 Show HN: Gut – An easy-to-use CLI for Git (gut-cli.dev)
https://nedbatchelder.com/blog/202303/watchgha.html
https://changelog.com/posts/git-is-simply-too-hard ***
https://jvns.ca/blog/2023/09/14/in-a-git-repository--where-do-your-files-live-/
https://jvns.ca/blog/2023/11/01/confusing-git-terminology/
https://jvns.ca/blog/2024/03/08/how-head-works-in-git/
https://news.ycombinator.com/item?id=39648643 How HEAD works in Git (jvns.ca)
https://news.ycombinator.com/item?id=38112951 Confusing Git Terminology (jvns.ca)
https://jvns.ca/blog/2023/11/23/branches-intuition-reality/
https://jvns.ca/blog/2024/01/05/do-we-think-of-git-commits-as-diffs--snapshots--or-histories/
https://jvns.ca/blog/2024/04/10/notes-on-git-error-messages/
https://www.gibbard.me/using_git_offline/
https://git-scm.com/docs/git-bundle

https://jvns.ca/blog/2024/01/26/inside-git/
https://news.ycombinator.com/item?id=39152517 Inside .git (jvns.ca)

<twainwek> which also reminds me of the time someone was told to
           "keep track of changes (of a .docx document)", so she
           put the .docx in a git repo and for all changes, she
           would make a new commit with the message "updated
           document".



https://www.gameoftrees.org/
https://www.gameoftrees.org/faq.html
http://darcs.net/Theory
https://pijul.org/

https://blog.hartwork.org/posts/clone-arbitrary-single-git-commit/
https://www.jvt.me/posts/2024/07/12/things-know-commits/
https://nerderati.com/tracing-the-evolution-of-a-python-function-with-git-log/
https://avestura.dev/blog/creating-a-git-commit-the-hard-way
https://learngitbranching.js.org/ 
https://news.ycombinator.com/item?id=41546769 Learn Git Branching (learngitbranching.js.org)

https://source.masscollabs.xyz/



#  Local Variables:
#  coding:               utf-8-unix
#  End: