Record change to the repository
As we add or modify a file, Git sees them as modified or new file. After added / modified, we have to stage the modified file and commit it to Git repository.
The lifecycle of the status of your files.
Some basic command in Git
- git status : to check status of file
- git add <file name>: to tracking a new or modified file.
- git commit: commit new / modified file to Git database.
- git diff: To see what you have changed. Note: git diff just show the change when the file not yet staged. To see what you have change in staged, use git diff --cached
- git rm: remove the file from repository and working directory. To remove file only in repository (untracked file) . Use: git rm --cahed