git add --edit
Interactive staging of changes
This command allows you to interactively stage changes in your git repository. It opens a text editor where you can modify the staged changes before finalizing the commit. This is useful when you want to review and selectively stage specific parts of a file.
You can save and close the editor to stage the changes, or abort the operation by closing the editor without saving.
Other variations of this command include git add -i
, which provide a menu-based interface to selectively stage changes in a more interactive manner.