Introducing Git & GitHub: A Friendly Guide For Newbies

Chaitanya Pratap Singh
5 min readOct 12, 2022

--

If you’re like me, you probably heard of Git and GitHub long before you knew what they were actually for. Sure, I knew they were some sort of code management system used by developers, but that was about the extent of my knowledge. I knew I needed to learn more about them if I ever wanted to break into the tech industry, so I decided to finally sit down and learn the basics. In this post, I’ll be sharing what I’ve learned in the hopes that it will help other newbies get started with Git and GitHub.

What is Git?

Git is a free and open-source distributed version control system designed to handle everything from small to very large projects with speed and efficiency.

Git is easy to learn and has a tiny footprint with lightning-fast performance. It outclasses SCM tools like Subversion, CVS, Perforce, and ClearCase with features like cheap local branching, convenient staging areas, and multiple workflows.

Git is a mature, actively maintained open-source project originally developed in 2005 by Linus Torvalds, the famous creator of the Linux operating system.

What is GitHub?

GitHub is a collaborative platform that allows developers to share code and build software together. It’s a great way to work on projects with other developers, and it’s also a great way to find new projects to work on. GitHub is an essential tool for many developers, and it’s also a great way to find new projects to contribute to.

So what is GitHub? In short, it’s a collaborative platform for developers. It’s a great way to work on projects with other developers, and it’s also a great way to find new projects to work on. If you’re a developer, chances are you’re already using GitHub. If not, you should check it out!

Setting Up Git

Version control is an important aspect of any software development project. In this section, we’ll take a look at setting up Git for your project. Git is a free and open-source version control system that can help keep track of your code changes and ensure that your work is always backed up.

There are a few different ways to set up Git for your project. In this article, we’ll show you how to set up a Git repository on your local machine and how to connect it to a remote server. We’ll also cover some basic Git commands you’ll need to know to work with Git.

Git software can be easily downloaded from its website and the installation process is quite standard

The main power of git is unleashed by using The CLI (Command Line Interface ). When you install git you get a utility called Git-Bash the native git cli but it can be called and used from any of the CLI tools(PowerShell, Hyper, Command Prompt, etc).

Before Doing anything you need to add your details to git by using the following two commands.

git config --global user.name "Your Name"

git config --global user.email "Your Email Which you used while making your Github Account"

Creating a GitHub Repository

Creating a GitHub repository is a quick and easy way to share your code with the world. In this article, we’ll show you how to create a new repository and get started with GitHub.

GitHub is a code hosting platform that allows developers to share their code with others. It’s a great place to find code snippets and examples that you can use in your projects. And it’s also a great way to get started with open-source development.

Creating a new repository is simple. Just head over to GitHub and sign in with your account. Once you’re signed in, click the “+” icon in the top right corner and select “New repository.”

Give your repository a name, choose a visibility level, and initialize the repository with a README file. That’s it! Now you’re ready to start sharing your code with the world

Basic Git Commands

  • git init — This command turns a directory into an empty Git repository.
  • git add — Adds files into the staging area for Git.
  • git commit — Record the changes made to the files to a local repository. For easy reference, each commit has a unique ID.
  • git status — This command returns the current state of the repository.
  • git branch — To determine what branch the local repository is on, add a new branch, or delete a branch.
  • git remote — To connect a local repository with a remote repository.
  • git clone — To create a local working copy of an existing remote repository, use git clone to copy and download the repository to a computer.
  • git pull — This pulls the changes from the remote repository to the local computer.
  • git push — Sends local commits to the remote repository.

Wrapping Up

Git and GitHub are simple yet powerful tools so they can be compiled into a single blog next week I’ll try to make a blog on how to use the above commands and make our first commit.

Thank you for taking the time to read my blog. I hope the information was useful and interesting. If you have any questions or would like to see more content on a particular topic, please let me know in the comments below. Additionally, if you enjoyed the content and would like to see more, be sure to check out my YouTube channel and consider supporting me on Buy Me a Coffee. Your support helps me to continue to create valuable content and it is truly appreciated it. Thank you for your support.

--

--

Chaitanya Pratap Singh

Content Creator🎞 | Programming Enthusiast🖥 | Student 👨🏻‍🎓Watch my latest videos on Youtube ▶️👇🏼 bit.ly/ytcps