Files
30-seconds-of-code/git/s/stage-files.md
Angelos Chalaris 5c913d20bd Reorganize snippets
2023-05-03 21:19:02 +03:00

547 B

title, type, language, tags, cover, dateModified
title type language tags cover dateModified
Add files to the staging area snippet git
commit
round-leaves 2021-04-13T21:10:59+03:00

Adds files to the staging area.

  • Use 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