Skip to main content

What is Git?

Description

Git is a version/source control software that tracks any changes across a set of source files usually used for tracking source code among collaborating programmers.
It's goal is to be fast and light. It also supports distrobuted non-linear workflows aka branches.
It is widely efficent at what it does, being able to support huge projects!
For example, if you looked at the code for Epic Game's Unreal Engine 5, you'll see that the code is over hundreds of gigabytes in size!
Git also has great security measures and methods that you can use to protect and secure your code from unwanted insertions of code, or pushes.
Git keeps a history of everything that happens across the source code, or the repository.

How Git Runs

It's possible that you've seen other version control software in the past. Git does not function like other software.
How Git saves and tracks your files is via snapshots.
Git takes snapshots of each file as it changes over time.
Git treats the repository like a mini filesystem, like how your PC would.
When you commit, Git takes a snapshot of what your filesystem looks like, aka all of the files that have changed, and stores a refrence to that snapshot.
To be efficent, Git does not store files that are unchanged, only modifying the changed files.

REMEMBER

Git has three states it'll be in: modified, staged, and commited.
Modified means that you have edited the file, but you have not submitted it to the database, or the repository yet.
Staged means that you have staged your files to be commited to the repository.
Commited means that you have commited your code to your local repository and are ready to push said changes to the centralized repository.
Remembering these are a must when it comes to working with this.