Let's do Git

I am going to discuss some basics when using git and GitHub. If you do not know git and GitHub are two separate things. Git is a version control which means that it tracks changes within a filling system. Github is where you store those various file systems as repositories.

let's break down some basic commands

First, git init is where everything begins. Git init allows you to create your repository. This is only done once per project. Git init is the actual command that you will use in the terminal to initialize your project. Now that you have your project's repository created the next step is staging your project.

Staging the project means getting ready to add what you worked on within your project to the filing system. Before I talk about staging let me discuss the workflow of Git. You will have coded certain things within your project such as updating a navbar or changing the background color in a particular file. Those are changes that you made and are now ready to be staged.

Staging The command for staging is git add . This allows you to group changes that were made within the file in preparing to commit the changes which is the third step that I will be talking about. Once you enter git add , the changes that you made in those particular files will be sitting and waiting for the next step and that next step is git commit.

Committing

After staging the particular areas of code that you worked on, the next command that you will use is git commit. Git commit allows you to move from the staging area to commit the changes that were made. When you make a commit you have to provide a message stating what that particular commit is doing, it basically summarizes the changes that were made and takes a snapshot.

These three commands are the commands that you will use on a daily basis while using git and Github. Hopefully, this was helpful. Happy coding!