Add
git add .
git add path/to/file.txt
git add path/to/file1.php folder1 path/to/file2.js path/to/folder2
git add ../path/to/file.txt ../../path/to/folder
git add
adds files to "staging" for the next commit.
You can remove files from "staging" (basically, undo the git add
) like so:
git restore --staged file1
git restore --staged .
git restored --staged path/to/folder1