Julia Evans on Nostr: thinking of writing a git zine bonus page about how to use `git add -p` but I ...
thinking of writing a git zine bonus page about how to use `git add -p`
but I realized that I don’t have a great way to solve my main problem with `git add -p`, which is that sometimes I have 2 adjacent lines and I want to stage one of them but not the other one
the solutions I know are
a) say ‘n', edit the file to undo one of the changes, and then run `git add -p` again
b) say ‘e’ and edit the patch manually (which I'm a little afraid of honestly)
(also I would welcome other tips!)
Published at
2024-06-13 18:40:00Event JSON
{
"id": "2b853ee9eae36db5e57605e12cd943bcec15c7e2db1e8fa146bc608e462247d2",
"pubkey": "b924d6ae8f6bb0c96d681f975c09155acb2a1bb2eb3efe32cb7b3ceb40cfae9f",
"created_at": 1718304000,
"kind": 1,
"tags": [
[
"imeta",
"url https://cdn.masto.host/socialjvnsca/media_attachments/files/112/610/770/629/350/260/original/74bb0de789a1d430.png",
"m image/png"
],
[
"proxy",
"https://social.jvns.ca/@b0rk/112610770959623699",
"web"
],
[
"proxy",
"https://social.jvns.ca/users/b0rk/statuses/112610770959623699",
"activitypub"
],
[
"L",
"pink.momostr"
],
[
"l",
"pink.momostr.activitypub:https://social.jvns.ca/users/b0rk/statuses/112610770959623699",
"pink.momostr"
]
],
"content": "thinking of writing a git zine bonus page about how to use `git add -p` \n\nbut I realized that I don’t have a great way to solve my main problem with `git add -p`, which is that sometimes I have 2 adjacent lines and I want to stage one of them but not the other one\n\nthe solutions I know are\n\na) say ‘n', edit the file to undo one of the changes, and then run `git add -p` again\nb) say ‘e’ and edit the patch manually (which I'm a little afraid of honestly)\n\n(also I would welcome other tips!)\nhttps://cdn.masto.host/socialjvnsca/media_attachments/files/112/610/770/629/350/260/original/74bb0de789a1d430.png\n",
"sig": "e33d2dd01947a585ab85f3a9e05d360b24b17f8e93ea3c4614275d385b16dd78fa107408a8a2c2a0841c3f06bfc8b116ef8bde676c5d8652be3bd46c1eb6cf21"
}