Julia Evans on Nostr: the main reason I've found this "all your git commits are folders" feature to be ...
the main reason I've found this "all your git commits are folders" feature to be useful is for searching past code: I can run `grep someFunction branch_histories/main/*/commit.go` to find the old version of someFunction I deleted. There are other ways to do that in git but this is easier.
or if I want to just quickly look at a file on another branch to copy a line from it, I can run `vim branches/other-branch/go.mod`
curious about other use cases
(from
https://github.com/jvns/git-commit-folders)
Published at
2023-11-29 11:23:57Event JSON
{
"id": "8021d3e91da3deae5d2a6b049310648f041d19f399389effcbcd068f7512a63d",
"pubkey": "26cad6f140bf86de9c26b7c15419cab1aebdd7086358d26aa2d750e21cf3bf2e",
"created_at": 1701257037,
"kind": 1,
"tags": [
[
"e",
"34ab55680b4eecaaa1e3e73098c41bd3ab7092926cfbdd704400a01fc0c284d1",
"wss://relay.mostr.pub",
"reply"
],
[
"proxy",
"https://social.jvns.ca/users/b0rk/statuses/111493581181145822",
"activitypub"
]
],
"content": "the main reason I've found this \"all your git commits are folders\" feature to be useful is for searching past code: I can run `grep someFunction branch_histories/main/*/commit.go` to find the old version of someFunction I deleted. There are other ways to do that in git but this is easier.\n\nor if I want to just quickly look at a file on another branch to copy a line from it, I can run `vim branches/other-branch/go.mod` \n\ncurious about other use cases\n\n(from https://github.com/jvns/git-commit-folders)",
"sig": "2eea75cafcd4fcb612aa871220133d0a51a32804f7aeeae2cc29e97df31da9d5096cb9cd58e9da87d213071e41177037a6c42e0b52efed5ff8e07c7bca3fe7d8"
}