There is one piece of advice that always remains constant: Create a GitHub account, learn Git, and push code every single day. The day you can create a program, web page, or a project that’s longer than 15 lines, you should be using Git. The good news is that learning the basics of Git in 2020 can only take 30 minutes.
What exactly is Git?
Git is a Version Control System (VCS). On a very basic level, there are two awesome things a version control system allows you to do: You can tack changes in your files, and it simplifies managing files and projects with multiple people. There are multiple Version Control Systems, but Git is by far the most popular — both for individual and company use.
This is not to be confused with GitHub, which is a web based Git repository. It provides a free and easy place to use Git, the cloud to store your code in, and it allows you to interact with other developers on Open Source projects.
Why should you use Git & GitHub?
Here are seven reasons you should be using Git and GitHub:
1. Cloud storage of your code.
Your code is always available to you. No matter what computer your using, or where you are. Hard Drive failure? No problem. All your code is backed up.
2. Version Control.
Every version of your code is also available to you. Git doesn’t work the same way as saving does in Microsoft Word. With Git, every time you commit your code, Git remembers what has changed since the last time you saved your code. Even if you’ve changed a file 1000 times, Git will remember each and every change. Need to revert back three months on a project for some reason? Git makes it easy.
3. Collaborating with a team
Git simplifies the process of working with other people and makes it easy to collaborate on projects. Team members can work on files and easily merge their changes in with the master branch of the project. This allows multiple people to work on the same files at the same time.
4. Reverting to older versions
GitHub allows you to look back on code you wrote in the past. You’re able to look at projects from years ago and make them better, or just see how you’ve been progressing.
5. Display your projects
GitHub is a great way to get noticed — Show off your code and your projects! Especially if you’re a self taught developer, GitHub provides you a way to prove to recruiters and companies that you can program.
6. Skills for a job in tech
Companies and Technologies around the world use Git: Amazon, Facebook, LinkedIn, Yahoo, Microsoft, Netflix, Rails, Android, Linux and Turner — just to name a few. Git can make you a much more ideal candidate in the real world.
Terminology with Git and GitHub
When we use GitHub a we do not call a project a “project”, instead it is called a repository. Git stores data locally on your computer and there are 3 stages when using Git:
- Working Directory – Your project folder
- Staging – Choosing certain files for a commit
- Commit – Think of it as “saving”
We use the Git Bash command line for Git.
Push – From your local computer to the GitHub server.
Ex: git push origin master
Pull – From GitHub server to your local computer.
Ex: git pull origin master