In this tutorial we will see how to adds a file or folder to the Git staging area using git add.
let's see example -
1) Add a specific folder or file to git staging area
git add file_name
2) Add all files or folder to git staging area
git add -A
or
git add .
Note - The process for changing a file or folder in a Git repository are like-
- Update a file or folder in the Git repository from your system.
- ➡️ Use git add to add those changes to the staging area.
- ➡️ Use git commit to move changes from the staging area to a commit.
- ➡️ Use git push to push those changes to the main repository.