Skip to main content

Source Control with Git

Course

Intro Video

Photo of Kenny Armstrong

Kenny Armstrong

Linux Training Architect II in Content

Kenny first encountered Solaris UNIX while I was in the military, and found out about Linux through the grapevine. He has worked with Linux in local government, fortune 500 companies, educational institutions, and by providing training. I have received Linux certifications from LPI, CompTIA, and Red Hat. Kenny has been working with Linux for nearly two decades and is passionate about sharing his knowledge with others about the system, and strives to learn more about the operating system every day.

Length

05:32:34

Difficulty

Intermediate

Videos

31

Hands-on Labs

4

Quizzes/Exams

5

Course Details

This is an introductory course that will help get someone new to Git up and running with it quickly. We will show you the basics of working out of your own local repository, and then we will apply those skills to working with remote repositories such as the ones you would find on GitHub and BitBucket.

We will also see how we can install our own web-based Git server by using the free version of GitLab. So if you ever wanted to learn the basics of working with Git, this is the course for you.

Syllabus

Course Introduction

Getting Started

Course Introduction

00:01:53

Lesson Description:

The introduction to our course on git.

About the Course Author

00:00:49

Lesson Description:

A little bit about me, your course author.

Installation of Git

Installation of Git

Installing Git on a Red Hat Based Distribution

00:01:06

Lesson Description:

Here is a walkthrough on installing git on a Red Hat based Linux distribution.

Installing Git on a Debian Based Distribution

00:01:18

Lesson Description:

A walkthrough on installing git on a Debian based Linux distribution.

Git Basics

The Basics of Using Git

Understanding the Git File System

00:04:28

Lesson Description:

An overview of git's architecture.

Creating a Local Repository (Empty)

00:03:30

Lesson Description:

Find out how to create a new git repository on your local system.

Basic Configuration of Git

00:05:01

Lesson Description:

Learn how to set up some basic parameters for your git environment. We will see how to configure the basic settings required for a git commit, and this is done via the git config command.

Adding Files to a Project

00:05:18

Lesson Description:

Learn how to add files and folders to a project that git will track. We will also cover a caveat to removing a file from git that has not been committed yet, and how to resolve that issue. This is the very first step to getting your files tracked with git.

The Status of Your Project

00:03:48

Lesson Description:

Use the status command with git to find out details about your current project's state. This will help you track your staged and unstaged files, and show you changes that are waiting to be committed. This way, you are always on top of the states of your files for your project.

Committing to Git

00:06:38

Lesson Description:

Now that you have items added to your repository, you will need to commit the changes to your project. Learn how git keeps track of the files that you commit, and how to safely remove them. We will perform these tasks with the git commit command.

Ignoring Certain File Types

00:05:39

Lesson Description:

Learn how to configure your git environment to ignore certain types of files that you don't want tracked. We will use a .gitignore file and show you how to use the git check-ignore command. This will help to keep your git repositories clean from unwanted files.

QUIZ: The Basics of Using Git

00:15:00

Hands-on Labs are real live environments that put you in a real scenario to practice what you have learned without any other extra charge or account to manage.

00:30:00

Hands-on Labs are real live environments that put you in a real scenario to practice what you have learned without any other extra charge or account to manage.

00:30:00

Tags, Branching, Merging and Reverting

Tags, Branching, Merging and Reverting

Using Tags

00:03:28

Lesson Description:

Learn how to tag a commit in git.  This is useful when you want to mark a point in your project's history, or use a specific tag as a reference point, such as a release of a specific version.  We will use the git tag command, and show you how to view all tags on a project, and how to delete them should you need to.

Using Branches

00:06:24

Lesson Description:

Here we learn about the basics of branching in git. This is helpful so that you can work on a different development line without altering your stable line of work. We show you how to create new branches, and switch between existing branches.

Merging Branches

00:07:27

Lesson Description:

Learn how to merge the works of different branches together. We will demonstrate the 'git merge' command. We will also find out how to deal with merge conflicts when we have work from different branches clashing with each other.

Rebasing

00:03:53

Lesson Description:

In this lesson, we will discuss an alternative method for applying changes to a branch - through rebasing. You would likely use a rebase method of applying changes when you want to push your own work to a remote repository. We demonstrate the use of the 'git rebase' command to see how a rebase works.

Reverting a Commit

00:04:21

Lesson Description:

This lesson will show you how to revert a commit in your project. You would want to revert a commit if you have something in your project that is interfering with the rest of the project, or if there was a mistake that you would like to rectify. We will use the 'git revert' command to accomplish this task.

Using the 'diff' Command

00:02:37

Lesson Description:

Find out how to use the 'git diff' command to see what changes have been applied between commits. You will also see how to determine what changes have been made within your staging area. This is a good way to keep track of the various changes within your repository.

How Garbage Collection Works

00:02:11

Lesson Description:

Learn about how git cleans up loose objects within a repository. We will demonstrate the usage of the 'git gc' command to clean up our repository and optimize our database. This is helpful if you have a large project and you need to keep git running in an efficient manner.

QUIZ: Tags, Branching, Merging and Reverting Using Git Source Control

00:15:00

Logging and Auditing

Git's Logs and Auditing

Using Git's Logs

00:03:56

Lesson Description:

Learn how to use the built-in logging functionality of git to keep track of what's going on with the repository. We will use the git log command and some of its more common options to format the log's output. This will also help you visualize the activity of your project.

QUIZ: Git Logging and Auditing

00:15:00

Cloning Repositories

Cloning Repositories

Cloning Local Repositories

00:01:36

Lesson Description:

Learn how to clone a local repository as a backup or as a testing ground for features or database work. We will demonstrate the basic usage of the git clone command to clone a local repository to a new location on the local system.

Cloning Remote Repositories over HTTPS

00:02:39

Lesson Description:

Find out how to clone remote repositories from popular sites such as GitHub onto your local system. We will clone over HTTPS, and show you what you get when you clone a project. We will use the 'git clone' command, just as we did when we cloned a local repository.

Forking

00:02:14

Lesson Description:

Learn about the fundamentals of forking a git project. We will discuss what forking a project means, and how you can have your own copy of a project still track the original project that it came from.

QUIZ: Cloning Git Repositories

00:15:00

Hands-on Labs are real live environments that put you in a real scenario to practice what you have learned without any other extra charge or account to manage.

00:30:00

Hands-on Labs are real live environments that put you in a real scenario to practice what you have learned without any other extra charge or account to manage.

00:45:00

Pull Requests

Push, Pull, and Tracking Remote Repositories

Tracking Remote Repositories

00:04:58

Lesson Description:

In this lesson, we learn how to set up our SSH key pairs for working with GitHub (the same process would apply to BitBucket as well). We learn how to clone a remote repository over SSH, and how to track it with the 'git remote' and 'git fetch' commands. This is the way that most projects work with remote repositories.

Pushing to Remote Repositories

00:02:28

Lesson Description:

Find out how easy it is to push local changes to a remote repository. We do this with the 'git push' command. If you want your modifications to be included in an upstream project, you will need to perform this task first.

Pull Requests

00:02:20

Lesson Description:

Now that you have your contributions to a project pushed to the remote repository, you will need to create a pull request to get it incorporated. Learn how easy it is to create a pull request on GitHub, and get your latest commit merged into the project.

QUIZ: Push, Pull and Track Remote Git Repositories

00:15:00

GitLab - Installation, Configuration and Use

Setting Up and Using a GitLab Server

What is GitLab?

00:02:01

Lesson Description:

In this video, we discuss GitLab and its two versions: Enterprise and Community Edition. We will build out our own GitLab Community Edition server in this section, so this video is an introduction to what GitLab is, and what some of its components are.

Download, Install and Configure for Local Use

00:09:20

Lesson Description:

In this video, we walk through the installation of GitLab Community Edition on a Linux Academy Cloud Server (using CentOS 7). Note that this install will take at least 30 minutes, so budget your time for this exercise. Also, it would be best to use a CentOS image that has at least 4GB of RAM for better performance.

Adding Users and Groups to GitLab

00:08:13

Lesson Description:

In this lesson, we will learn how to add new users and groups to our GitLab server. Then we will see how we can apply different permissions to both users and groups. This is to help maintain the security of the system and the projects it contains.

Creating and Managing Projects

00:05:29

Lesson Description:

Learn how to create project repositories in GitLab, and set up your local system to track it. We will use SSH keys to manage the access, and add our first file to the project. This is your first step to managing projects in GitLab.

Push Changes and Merge with GitLab

00:06:12

Lesson Description:

Here we will discuss the process of pushing changes from a new branch up to the GitLab server. Then we will see how to merge those changes. We will work from the command line on our local branch, then use the GitLab web interface to merge the changes.

Course Conclusion

Next Steps

Next Steps

00:01:05

Lesson Description:

Now that you have completed the course, find out about what you can tackle next!