What are the different process in staging how does it work?
What are the different process in staging how does it work?
Staging in Git refers to a phase which includes all the changes you want to include in the next commit . Here are the steps leading to staging:
- You make changes to a file in the working directory.
- You use the Git add command to move those changes from the working directory to the staging area .
- Git does not save changes yet. You need to run the Git commit command to move changes from the staging area to the local repository .
Additionally, you may use git status command to check the status of the files and the staging area. If changes are not staged for commit, they won’t be saved .
The Git add command moves changes to the staging area .
Here is a basic example of using add :
git add file_name