Git

Git Definition

Git Example

Git allows developers to track changes made to the codebase over time, collaborate efficiently, and revert back to previous states if necessary. Here's a brief overview of how it works:

This allows different users of the same codebase to collaborate without causing issues. For example, let's take this situation.

10 am
10:30 am

In this case, two groups of users modified the same document at different times. Which one is pushed to the database? And how can you tell which file is the one that is pushed? Each file has a hash created by a Hash Function, and in this case, the earlier file hash will have a unique identifier that matches with its committed state in the Git repository. The later file, even though it may have changes that were made after the first commit, will still have a different hash because of these modifications.