Additional features#

git diff#

Command git diff allows you to see the difference between different states. For example, README and .gitignore files have been changed in repository.

Command git status shows that both files have been changed

Command git diff command shows what changes have been made since last commit

If you add changes made to staging via git add command and run git diff again, it will show nothing

To show the difference between staging and last commit, add parameter --staged

Commit changes

git log#

Command git log command shows when last changes were made

By default, command displays all commits starting from the nearest time. With help of additional parameters it is possible not only to look at information about commits but also what changes have been made.

Flag -p allows you to display the differences that have been made by each commit

Shorter output option can be displayed with flag --stat