Episode 4 of 14

Staging Files

Learn about Staging Files

Create a new file: Add a new text file or code file to your project directory. Check status again: Run git status to see the new file listed as untracked under red text. Track the file: Run git add followed by the filename to stage the file for the next commit. Verify staging: Run git status again to see the file listed under changes to be committed in green text. Stage all files: To stage all modified and new files at once, use the command git add . Understand the staging area: The staging area is a middle ground where you prepare exactly what changes you want to include in your next snapshot.