The staging area is a temporary holding place where selected changes are assembled into an exact snapshot before committing them to a local Git repository. section 5.2.2
Use the staging area in this deployment workflow:
- Initialize the project directory as a local Git repository with git init. section 5.2.2
- Run git add . to place the current project files into the staging area. section 5.2.2
- Run git commit with a descriptive message to save the staged snapshot locally. section 5.2.2
Preparing a to-do app
For a project containing todo_list.py and task.py, git add . prepares both files for one commit, such as git commit -m "Commit Streamlit to-do list app". The resulting snapshot can then be pushed to GitHub. section 5.2.2
git add .
View the exact command used to add the current directory’s contents to the staging area. section 5.2.2
