Git has some fancy jargon that everyone uses, but what does it all mean and how does it connect? Let's break it down into layman's terms! 👨🏫
Git keeps track of all of the files in a project. Whenever you make a change to a file, git knows precisely what you've changed and keeps track of it.
A commit is a collection of changes. Whenever you make a commit you are telling git that you'd like it to save all of the changes that you've made.
A branch is just a sequence of commits, so all of the changes you've made starting from the beginning of the project.
Whenever you branch you split off from the commit you are at currently. Other branches don't keep track of the commits you make on a separate branch, this allows you to make changes without stepping on anyone else's toes!
A repository, also known as a repo, is a collection of branches. It is the entire project, every commit on every branch.
A remote is a repository that isn't the one you are in currently. You can link to a remote to push and pull from it.
When you push, you upload your commits from a branch on your computer to a remote repository's branch
When you pull, you download the commits from a remote repository's branch to a repository on your computer's branch.
Merging is when you synchronize the commits of two branches.
A merge conflict is when two commits change the same thing!
GitHub is a website that hosts remote repositories!
A clone is a copy of a remote repository. If you don't have permissions, you cannot push changes to the remote.
A fork is a clone of a repository on Github under your name. You can push changes to your forked repository!