# Adding only a portion of a file

See <https://git-extensions-documentation.readthedocs.io/en/latest/commit.html#staging-selected-lines>

In the commit dialog, we do not have to commit all of the changes of a file. In the diff view on the right, we can select individual lines for the next commit, and press the \[S] key or the Stage context menu item to add the lines to the staging area.

You may want to turn the `ignore white space` options off which can be located at the dock bar on the right top of the diff view when the view is focused.

Command line:

```
git add -i
# or
git add --interactive
```
