Back

Version Control/Git/GitHub

What is it?

One of the first things I learned about in my journey as a developer was the importance of using Version Control in your everyday work in web and software development. My friend really introduced me to GitHub and all of it's tools through a blog post he made a few years ago. I am very much greatful for this as it's helped me really become much more organized as a developer.

What is this Version Control exactly? One of the technical terms: "also known as source control, is the practice of tracking and managing changes to software code. Version control systems are software tools that help software teams manage changes to source code over time. As development environments have accelerated, version control systems help software teams work faster and smarter. They are especially useful for DevOps teams since they help them to reduce development time and increase successful deployments."

What I use it for

Right now, I mainly use it as "save points" in my work. Whenever I am at a checkpoint or have made great strides in any of my work, I make commits that act as these save points. Not only can I use Git to save all of my work and progress, I'm also able to retrieve any of my projects onto another device if needed.

How I get started

After creating a GitHub account as well as having Git installed onto my PC, I can go in and create what's called a repository. Let's name it "MyProject." I usually skip creating a README and whatever else because I add these within my local files as I go. I typically create a project in my main workspace folder (MyDocuments/Code). Once I create a folder and have my work in that folder, I 'cd' to it. 'cd' meaning change directory.

I highly recommend learning about VSCode and the basics of command lines in order to help you get started. Once you know those, learning about git will become easier! So after changing my VSCode's terminal directory to (MyDocuments/Code/MyProject), and already having a repo of the same name, I can now run all of these. In this example it'll be my username and my project name. For you, it'll be yours.

git init
git add README.md
git commit -m "first commit"
git branch -M main
git remote add origin https://github.com/ErikMoxley/MyProject.git
git push -u origin main

What now?

Once I do that and have no errors, I can now make and save changes in that project and run these commands.

git add .
git commit -m "your message/update here"
git push

This will save any progress that I have made onto my GitHub account. Once this is successfully setup, you can learn and do much more from here on out.

What else is there?

I know there's a lot more for me to learn, but I am familiar with the basics and have been exposed to some of the things experienced developers and teams know when using Version Control at their level. Not only does it track your project history for your future employers to see, it creates backups, it's scalable, supports team collaborations, allows you to work on smaller parts of projects through branching, and it also allows you to deploy your static sites right from GitHub itself! It's a very useful tool and I always recommend it to new developers who are just starting out.

Some Resources

Colt Steele's Learn GitHub in 20 Mins
FreeCodeCamp's Git Cheatsheet

    Picture of the author
  • About

  • Contact

  • This blog was made with NextJS plus: