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

634 B

title, tags, firstSeen, lastUpdated
title tags firstSeen lastUpdated
Remove files from the staging area commit,beginner 2021-04-06T19:38:51+03:00 2021-04-13T21:10:59+03:00

Removes files from the staging area.

  • Use git restore --staged <pathspec> to remove files from the staging area.
  • <pathspec> can be a filename or a fileglob.
git restore --staged <pathspec>
git restore --staged "30seconds.txt"
# Remove the file `30seconds.txt` from the staging area

git restore --staged src/*.json
# Remove all files with a `.json` extension in the `src` directory

git restore --staged .
# Remove all changes from the staging area