# Git in Action #4

To save a snapshot of the codebase we need to add our files to the index. Index is the list of files which will be saved in the next commit. General syntax for adding:

```
git add <Filename>
``` 
For file name we can use wild characters such as *.js <br/>
Dot < . > means all. Therefore to add all changed files to the index we can use

```
git add .
``` 
> Note: We can add files in multiple times before committing. <br/>However the best practice is to add only the files that contribute to a single task such as adding a button, fixing component alignment, or rewrite the logic. <br/>This way the history of changes will illustrate the progress and if we need a specific change in another [branch](#) then [cherry picking](#) will be more convenient.

[Next Section](https://simplekit.hashnode.dev/git-in-action-5)
