git
VCS version controle system
Radicle - peer-to-peer code collaboration #p2p
sourcehut - the hacker's forge
Husky - Git hooks
https://git-scm.com/book/ja/v2/Git-のさまざまなツール-サブモジュール
git-tips/tips: Most commonly used git tips and tricks.
detached head で commit してしまった場合は、マージするか cherry-pick すれば ok
【Git】reset , checkout , 「 . 」有無の比較表 - MarkdownとBullet Journal
fixup と squash の違い
If you want to fold two or more commits into one, replace the command "pick" for the second and subsequent commits with "squash" or "fixup". If the commits had different authors, the folded commit will be attributed to the author of the first commit. The suggested commit message for the folded commit is the concatenation of the first commit’s message with those identified by "squash" commands, omitting the messages of commits identified by "fixup" commands, unless "fixup -c" is used.
from Git - git-rebase Documentation
^ と ~
caret and tilde
キャレットとチルダ
Git - Revision Selection
pager option は CLI 作るときの参考になりそう
ある merge に含まれる内容を切り出したい
merge commit を単純に cherry-pick はできない
どちらの親を採用すべきか不明なため
git cherry-pick -m 1 <id>
-m で parent number を指定している
通常の merge commit では、取り込まれたブランチが 1 になるらしいが、よくわからない
Ref: https://git-scm.com/docs/git-cherry-pick#Documentation/git-cherry-pick.txt--mltparent-numbergt
git - Mainline parent number when cherry picking merge commits - Stack Overflow
Merge strategy
Git - merge-strategies Documentation
最近は ort という新しい merge strategy が default みたい
https://github.blog/2021-08-16-highlights-from-git-2-33/#:~:text=The%20merge-ort%20strategy%20is,gains%20over%20a%20500x%20speedup
git cherry-pick <ID> --strategy=ort -Xtheirs みたいな感じ
これは conflict したら pick される側のコードを採用する(strategy は ort)
-Xtheirs は ort の option
--strategy=ours があるので注意
commit message
Writing good CL descriptions | eng-practices
コミットメッセージの書き方. 適切な情報を残そう | by risacan | Medium
How to Write a Git Commit Message
commit message に # を含めたい時どうするか
https://stackoverflow.com/a/37058066
git commit --cleanup=scissors を使うと、ハサミマーク以下が消える。それより上は # をコメントアウトに設定していても含まれる。
Conventional Commits
branch naming
Conventional Branch
git commit --fixup と git rebase --autosquash で簡単に commit が整理できて感動した話 - reboooot․net
Git's database internals I: packed object store | The GitHub Blog
どの commit でバグが入ったかみつけるのを支援してくれる
Git - git-bisect Documentation
gitignore
conflicts
git merge - What's the simplest way to list conflicted files in Git? - Stack Overflow
working directory, working tree
Git - Reset Demystified