What are git & GitHub?
Learn how Git and GitHub prevent conflicting code changes, using branches, pull requests, and automated tests to keep software stable and deployable.
If you’ve ever shared a document with a friend and watched it turn into a mess of conflicting edits, imagine doing that with thousands of lines of code. That’s exactly the problem Git solves.
Git is a "version control system". It keeps track of every file in your project—called a repository—and takes snapshots of the current state as you work. Without it, two developers changing the same file simultaneously would create a mixture of code that simply doesn’t work together. Your website or app would break, and you’d have no idea whose changes caused it.
Git was invented by the same person who created Linux, the operating system that runs much of the world’s servers. Today, most developers use GitHub, a platform owned by Microsoft, to back up their repositories off-site and collaborate with others. It’s where code is housed, reviewed, and ultimately deployed to the internet.
Here’s how the workflow typically plays out. You start by writing tests—automated checks that assert your code behaves correctly. If a change breaks those tests, it gets gated. Your code doesn’t go live until it passes. This safety net is crucial.
Next, you create a branch off the main line of code. "Main" used to be called "master," but the industry shifted to "main" to avoid outdated terminology. On your branch, you make your changes, add new files, and take snapshots as you go. When you’re done, you create a pull request. This is your formal ask: "Please pull my code into main because this new feature is ready."
Your teammates review the code. They check for logic errors, style issues, and potential bugs. Then, they run the automated tests again. Do the buttons still work? Does the homepage load? If everything passes, they merge your branch back into main. Now main has a new, stable version that can be safely deployed to production.
It’s not magic, but it’s a disciplined way to keep complex software from collapsing under the weight of its own complexity. If you’re curious about how this works in practice, or want to know more about testing strategies, drop a question in the comments. I’ll do my best to answer.
Git and GitHub are optional for everyday AI use, but they become useful guardrails when AI helps you change software. Learning AI for Everyday Life starts with a no-coding exercise and explains when stronger read-back and automated checks are appropriate.