What is Git?
Git is an extremely sophisticated tool—and it’s also one of the most important ones in a developer’s toolkit. Early on in our after school program at Aspire Coding Academy, we teach students common git operations to get started.
Remind Me Why We Need This? 🙋♂️
Git is a version control system, which means it helps you track changes in your code over time. Even if you don't fully understand this, you should convince yourself that git is always worth setting up, no matter how small your project may be. Many developers have lost their hard work due to not setting up Git or another version control system.
Imagine writing a long paper—you’d probably want to save multiple versions as you go, just in case something breaks or you want to revisit an earlier draft. Git does exactly that for code. It's free, it won't be irreversible, just do it!
The Core Commands 🪨
This blog assumes you have Git installed and a Git repository initialized.
git add: This tells Git which files, out of the ones you have edited, you want to include in your next version (called a "commit"). Think of it like prepping items to go in a box.
git commit: This actually saves the version of your code. It’s like sealing and labeling that box with a message describing the contents.
git push: This sends your committed changes to a shared online repository (like GitHub), so your teammates—or future you—can access it.
Together, these three commands often make up your standard Git workflow.
A Glimpse into Git’s Full Power 🔋
Git is capable of much more than the above. On your coding journey you'll get familiar with branching, merging, reverting, rebasing, stashing, and beyond. It's used by teams building some of the most complex software in the world. Like any other tool in programming, you'll really need to practice and get your hands dirty to properly understand these concepts.
Questions?
Contact us below! We’re happy to discuss all things software. Follow us on LinkedIn for updates on new blog posts.