git/add

Add Files

Add file contents to the index

git
add
files

Command

git add

Explanation

git add is used to add file contents to the index. It adds the file contents to the index.

Examples

Stage specific file

git add file.txt

Stage all changes

git add .

Stage changes interactively

git add -p