educative.io

https://www.educative.io/module/page/LgoqGKFl7YxO2wNDm/10370001/4636226247720960/5265965475954688

Hi Guys,

How do I view the files and changes made at a certain commit ID? Maybe I am not understanding correctly. So each commit something is changed or updated. Is it a snapshot of the entire repository taken at each commit? Please let me know your thoughts.

Best Wishes,

Mahesh


Type your question above this line.

Course: https://www.educative.io/collection/10370001/6075350136651776
Lesson: https://www.educative.io/collection/page/10370001/6075350136651776/6486472694169600

Hi @Mahesh, we are glad you reached us.

You can view the files that are affected by the git commit command by using the following command:
git log --raw command.
Basically, git commit command is used to save a snapshot of the project, it is the safe version that will not change itself unless you explicitly do so.

Adding commits helps us keep track of our progress, and we can see from our previous commits in case of any bug, or if we want to look back, you can even revert back to that commit.

The commits can never overwrite each other because each commit has a different commit ID.
Commit itself does not change anything; a commit simply means you are saving the project’s current snapshot as a version.

Hope Educative has helped you in your learning :slight_smile:.