8/11/2023 0 Comments Hunks workshop english patchAnd you want to add it above baz.įrom this spot you can just change the minus to a space, making that line context for the diff. When you git add -e, you’ll be presented with a diff like so: fooįrom here you can decide, actually, you don’t want to delete baz, you just want to add bar. Say you’ve replaced a line containing “baz” with one containing “bar”. I used this trick to recently split apart one massive commit into 28 smaller, digestible ones. Or, in other words, whereas git add -p will show you each hunk for every file and ask what you want to do for each of them, git add -e will show you the entire patch and allow you to edit it at will. Git add -e is like git add -p, except instead of adding things at the hunk level, you edit the entire patch at once.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |