Adds files to the staging area.
git add <pathspec>
to add files to the staging area.<pathspec>
can be a filename or a fileglob.git add <pathspec>
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
Git, Commit
Removes files from the staging area.
Git, Commit
Removes a file from the last commit without changing its message.
Git, Commit
Displays differences between staged or unstaged changes and the last commit.