Files
30-seconds-of-code/snippets/stage-files.md
2022-03-22 12:02:38 +02:00

567 B

title, tags, expertise, author, firstSeen, lastUpdated
title tags expertise author firstSeen lastUpdated
Add files to the staging area commit beginner maciv 2021-04-06T16:39:37+03:00 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