From: Johannes Schindelin Date: Wed, 8 Apr 2009 21:30:24 +0000 (+0200) Subject: git-add: introduce --edit (to edit the diff vs. the index) X-Git-Tag: v1.6.4-rc0~158^2~1 X-Git-Url: https://git.lorimer.id.au/gitweb.git/diff_plain/c59cb03a8bfc4b09758b07b23b6fe70a909ff9f4?hp=c59cb03a8bfc4b09758b07b23b6fe70a909ff9f4 git-add: introduce --edit (to edit the diff vs. the index) With "git add -e []", Git will fire up an editor with the current diff relative to the index (i.e. what you would get with "git diff []"). Now you can edit the patch as much as you like, including adding/removing lines, editing the text, whatever. Make sure, though, that the first character of the hunk lines is still a space, a plus or a minus. After you closed the editor, Git will adjust the line counts of the hunks if necessary, thanks to the --recount option of apply, and commit the patch. Except if you deleted everything, in which case nothing happens (for obvious reasons). Signed-off-by: Johannes Schindelin Signed-off-by: Junio C Hamano ---