Git
We use Git to save our code in snapshots that we can go back to whenever we want. And it lets people work together on code.

Git is an invaluable tool.

It allows us to work for months and years on a project, and yet get back to each individual change we made on the codebase.

It provides the ability to roll back and maintain separate different versions at the same time.

Each time we make a change or add a new feature or fix a bug we add a little explanation and we commit the changes.

Git is a distributed system. Many developers can collaborate on a single codebase by cloning a repository from a central location, work independently on some portion of code, and then committing the changes back to the central location where everybody updates.

Git makes it very easy for developers to collaborate on a codebase simultaneously and provides tools they can use to combine all the independent changes they make.

If you’re working solo, it’s handy because it allows you to roll back to previous versions of your code.

And also, it allows you to add notes when you do some changes, called commit messages, so in the future, you can say “ah that’s why I did that, 2 years ago”.

It also allows us to work with a team because each individual person can push commits to the codebase and Git takes care of making sure there are no conflicts with changes made by other people. And you can see who wrote a specific line of code, so you can ask for more information if needed.

There are various ways to use Git.

One is the command line. I’ll introduce this in this unit.

Another way is by using an application that makes things visual. We’ll see how to use GitHub Desktop in the next unit.

GitHub is a very popular service that hosts Git repositories, especially for Open Source software, but we can also mention BitBucket, GitLab and many others which are widely used by teams all over the world to host their code publicly and also privately.

Lessons in this unit:

0: ▶︎ Introduction
1: Installing Git
2: Initialize a repository
3: Commit changes
4: Branches
5: Push and pull
6: Working with a remote
7: Solving conflicts
8: .gitignore
Are you intimidated by Git? Can’t figure out merge vs rebase? Are you afraid of screwing up something any time you have to do something in Git? Do you rely on ChatGPT or random people’s answer on StackOverflow to fix your problems? Your coworkers are tired of explaining Git to you all the time? Git is something we all need to use, but few of us really master it. I created this course to improve your Git (and GitHub) knowledge at a radical level. Launching May 21, 2024. Join the waiting list!