Getting Git

A comprehensive video course from git init to Git Master.

Part 1: Summary


This completes Part 1. To summarize, I will demonstrate all of the commands we covered.

I may use some of the options I covered in the Master videos.

Don't worry if you're not familiar with these yet. You can go back and watch them at any time.

Also, I'm going to go a little fast. So don't feel like you need to follow along with the commands.

Instead, focus more on the process of how I'm using the commands together.

First, I'll navigate to my workspace.

I'm going to make a directory called part-1-demo.

I'll change into that directory.

I'm going to create 3 files.

I'll add version control by turning this directory into a Git repository.

I'll run git status to see the current state.

Since I know these are all new files and it's my first commit, I'm going to add everything with git add ..

I'll then record this as the traditional Initial commit.

I'll run git status again just to ensure I didn't miss anything.

Now, I'm going to add some content to File 2.

Since I'm changing the contents of files, I like to use git add -p so I have the chance to review the changes one by one.

Everything looks good. So I'll record this as another commit.

Again, a quick git status confirms I'm in a clean state.

Now, I'm going to remove File 3 with git rm.

Running git status shows the proper change.

I'll commit this change and run git status again.

Now, I realized I don't need the change I made to File 2 earlier.

Since it's not the previous commit, I can't use git reset.

Instead, I'll need to use git revert.

I can scroll back up to get the commit SHA and pass it to git revert.

I'll run git status and output the contents of File 2 to verify the revert.

Everything looks as expected.

I can continue this process of making changes and commits through the lifecycle of my project.

Really, these are the only commands I need to manage a standalone project.

So that completes Part 1 - there were definitely some options and uses of these commands I did not cover.

In addition, I didn't explicitly cover commands like git status.

This was intentional as not to cover too much too quickly.

Don't worry, as we'll learn these Git commands and more in future parts.

In fact, git status is the very first command we learn in Part 2.