![Forrest logo](/images/logo.png)
git-stage:tldr:af769
The correct command is "git add -i" not "git stage -i".
"git add -i" is a command in Git that initiates the interactive mode to selectively stage changes in the working tree for the next commit. It allows you to review modified files and choose which changes to include in the commit.
When you run "git add -i", Git presents a menu of options such as "status", "update", "add untracked", "patch", etc. These options allow you to browse and select specific changes or files to stage. You can review the changes, mark them for staging, and even split hunks of changes into smaller parts if needed.
This interactive mode is useful when you have multiple changes in different files, and you want to make granular commits instead of committing all the changes at once. It gives you more control over what gets included in each commit.