git в emacs
Слабоначатое.
- https://github.com/thisirs/vc-auto-commit - allows you to automatically commit all the changes of a repository. It is useful when you have a project that needs to be put under a version control system but you don't want to write any commit message. Очень полезная штука, и заменила мне flashbake
- https://www.emacswiki.org/emacs/Git - тут уйма всего, и вообще было б полезно, конечно.
- https://magit.vc/manual/forge/Branching.html#Branching - что-то про то, как быть с гитлабом через magit
Forge - какие-то плюшки по работе с issues и ещё какими-то радостями гитлабов и т.п.
- https://gitlab.com/pidu/git-timemachine - шариться по версиям файла.
- https://gitlab.com/protesilaos/dotfiles/-/blob/master/emacs/.emacs.d/prot-lisp/prot-vc.el какие-то добавления к vc.el от prot-а.
- есть удобная штука smerge-modeдля решения конфликтов, и там командаsmerge-vc-next-conflict, которая позволяет переходить к следующим нерешённым конфликтам в том же репозитории.
- https://mbork.pl/2024-04-08_Even_more_Magit_tips – занятности в magit.
- https://orgmode.org/worg/org-contrib/org-git-link.html — ссылки в org-mode на конкретную версию файла в git.
git push - способы
https://stackoverflow.com/questions/13736222/how-to-git-push-using-git-emacs
- Во-первых, конечно, magit-push в Magit.
- Во-вторых:
Newer versions of Emacs provide the command C-x v P, longer versionM-x vc-push(as noted by @CAT0).
- В-третьих, запустить git-push как внешнюю команду, но из emacs M-& git push [Enter], longer version:M-x async-shell-command [Enter] git push [Enter]. As pointed out by @mariotomo this is better than the synchronous version below because it opens a buffer for the output.- M-! git push [Enter]longer version:- M-x shell-command [Enter] git push [Enter](как раз синхронная).
 
Из magit в vc
- https://www.manueluberti.eu//emacs/2021/11/27/vc/ - собстно, текстег про это.
- https://paste.sr.ht/~akagi/ae81410ffa22f5572c206330d024c0613c33a6f5 - доработанная табличка оттуда.
| Operations | VC | VC-dir (same commands) | Magit | 
------------------------------------------------------------------------------------------–—+
| Project status | project-vc-dir (C-x p v) | — | magit-status (C-x g) | 
| Pull | vc-update (C-x v +) | … (+) | magit-pull (F p) | 
| Checkout | vc-retrieve-tag (C-x v r) | … (B s) | magit-branch (b b) | 
| New branch | C-u vc-create-tag (C-u C-x v s) | … | magit-branch (b c) | 
| Commit | vc-next-action (C-x v v) | … (v) | magit-commit (c c) | 
| Rebase | shell-command (M-!) + git rebase master | … | magit-rebase (r p) | 
| Push | vc-push (C-x v P) | … (P or C-u P) | magit-push (P p) | 
| Stash | vc-git-stash-%operation% | … | magit-stash (z) | 
| Log | vc-print-root-log (C-x v L) | … (L) | magit-log (l l) | 
Чтобы закоммитить несколько файлов разом, в vc-dir выделяем несколько измененных файлов кнопочкой m, потом "следующее действие" по m.
- https://www.gnu.org/software/emacs/manual/html_node/emacs/Old-Revisions.html
- C-x v =
- Compare the work files in the current VC fileset with the versions you started from (vc-diff). With a prefix argument, prompt for two revisions of the current VC fileset and compare them. You can also call this command from a Dired buffer
 
