Files
30-seconds-of-code/snippets/stage-files.md
Isabelle Viktoria Maciohsek ed2f41b0d8 Bake dates into snippets
2021-06-13 19:47:48 +03:00

542 B

title, tags, firstSeen, lastUpdated
title tags firstSeen lastUpdated
Add files to the staging area commit,beginner 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