DevOps / GIT Interview Questions
How do I view the file changes (diff) before committing in GIT?
Use the git diff comand as shown below.
git diff "filename_to_diff"
The above command works only when the file is not added already. If it is added already, use the same command with cached option as shown below.
git diff --cached "filename_to_diff"
More Related questions...