Estimated Time: ~30 minutes
<aside> 💡 Welcome to CodeLab's Git/GitHub tutorial! Our goal is to teach you what Git and GitHub are, why they're so important, and how you'll be using them.
</aside>
Git is a version control system - basically, a CLI that can track all of the changes you make to a folder full of files. So if you're creating a mobile application and change the home screen to say "Goodbye World" instead of "Hello World", Git will track and log that change.
When you use Git, you have a repository (AKA repo), which is a giant folder that all of your source code is in.
GitHub is a cloud service that acts as that remote repository - it allows you to view and manage your repository and all past versions of it. It's necessary because while you can use Git locally, you have no place to store the history online or actually back up your files if you lose them.
Simply put, Git and GitHub allow us to have multiple people working on the same project, easily and automatically save backups of past code, track who is doing what, and store our code online for easy remote and future access.
When you're in the command line, you're using Git - you can use it to make changes to either your local or remote repository, the latter of which is stored on GitHub.
A local repository is the code currently stored on your computer. A remote repository is the code currently stored on GitHub. GitHub should act as the "source of truth" of what everyone else has contributed to the project up to that point. Git tracks differences between your local code and the remote code, and can then modify the remote code as you tell it to.
As we walk you through the core Git concepts there are to know, you'll need to first setup Git itself on your computer.
git config --global user.name "Your Name"
git config --global user.name # Confirms you've set the name correctly
git config --global user.email "[email protected]" # Same email as your GitHub
git config --global user.email # Confirms you've set the email correctly
Git Bash is the terminal that we have to use to interact with git. We prefix every git command with the git keyword!