Git add all new files

To add all new files to the staging area in Git, you can use the following command:

git add.

The dot (.) is a shorthand for "all files in the current directory". This command will stage all new files that have been created in the current directory and its subdirectories.

If you want to add all new files in a specific directory, you can specify the directory path instead of the dot:

git add path/to/directory

For example, to add all new files in the docs directory, you would use:

git add docs

Note that this command will not stage modified files, only new files that have been created. If you want to stage modified files as well, you can use the following command:

git add -A

The -A option tells Git to stage all changes, including modified files, in addition to new files.