Skip to content

Home

Add files to the staging area

Adds files to the staging area.

git add <pathspec>

# Examples
git add "30seconds.txt"
# Add the file `30seconds.txt` to the staging area

git add src/*.json
# Add all files with a `.json` extension in the `src` directory

git add .
# Adds all changes to the staging area

More like this

Start typing a keyphrase to see matching snippets.