Cademy logoCademy Marketplace

Course Images

Git and GitHub Crash Course

Git and GitHub Crash Course

  • 30 Day Money Back Guarantee
  • Completion Certificate
  • 24/7 Technical Support

Highlights

  • On-Demand course

  • 1 hour 15 minutes

  • All levels

Description

This course focuses on the basic features of Git and GitHub such as commits, branches, merging, GitHub, and Git objects. If you are new to Git and GitHub, this course will help you get familiarized with the concepts so that you can use them in your projects and the projects that you potentially will contribute to in the future.

This course is designed to guide you through working with Git and GitHub. You will start by learning how to install Git and initialize a new Git repository on Windows, Mac, and Linux/Unix systems and then understand how to use it on the command line. Next, you will learn the four types of objects in Git: blobs, trees, commits, and annotated tags. Each object has a unique SHA1 hash. All objects are stored in the folders. Every object has just a single reference to it-SHA1 hash. Files are stored in blobs. Filenames are stored in other Git objects called trees. The videos will guide you through making changes, staging them, and committing them afterward. Also, you will learn and practice how to observe commits tree and checkout different commits to 'travel in time' between different states of the Git repository. By the end of this course, you will be well-versed with the basics of Git and GitHub.

What You Will Learn

Create and initialize local and remote Git repositories
Synchronize local and remote repository at GitHub
Make changes in the working directory, add them to the staging area, and commit
Create, checkout, and merge branches
Analyze contents of the Git objects
Explore pushing and pulling operations
Make changes in the files directly at GitHub

Audience

This course is for complete beginners who are new to Git and GitHub, software developers who want to learn what is Git and how to use its basic features, and developers who want to learn how to connect GitHub and Git repositories.

Approach

The entire course follows a practical hands-on approach ensuring that you can practice and understand all core Git and GitHub features. It provides interactive activities to give you a practical learning experience.

Key Features

Explore how Git and GitHub work, along with their basic features * Learn how to manage commits, branches, merging, and objects in GitHub and Git * Perform basic operations such as committing changes, pushing to the remote, and merging branches

About the Author

Bogdan Stashchuk

Bogdan Stashchuk has over 20 years of experience as a software engineering instructor. He excels at breaking down complex topics into easy-to-follow steps. His courses are designed with hands-on exercises, ensuring that learners can actively participate and apply what they learn. From start to finish, students can follow along and complete tasks just as Bogdan demonstrates in his lectures. He also includes challenging assignments with detailed solutions. This approach helps learners understand and remember the material long after they've completed the course. Through his dedication and expertise, Bogdan ensures a valuable and effective learning experience for everyone.

Course Outline

1. Introduction

1. Git and GitHub Crash Course Overview

This section will provide a quick overview of the course and tell you what will be covered in different sections, followed by the difference between Git and GitHub.


2. Getting Started with Git

1. Installing Git

Learn how to install Git on your computer.

2. Initializing new Git Repository

Learn how to create and initialize new Git repositories. What to do if you can't rename "master" branch to "main": If you are not able to rename "master" branch to "main" and see the following error: Error: refname refs/heads/master not found fatal: Branch rename failed You need to do ONE of the following steps: Update Git to the latest version. Proceed working in the "master" branch and rename it to "main" after the first commit or later before we push local changes to the remote repository

3. Git Object Types

In this lesson, the different types of Git objects will be explained. There are four different types of Git objects, namely, blob, tree, commit, and annotated tag.

4. Hashes of the Git Objects

Every object in Git has a specific hash. Hash is a unique identifier of every Git object in the Git repository. Hash is created using specific hash functions, namely SHA-1. Hash functions create fixed length hashes from any variable length input.


3. Committing Changes in the Git Repository

1. Adding Changes to the Staging Area

Create a new file in the shell. A file in Git will be in the working directory, staging area(index), or repository. If the file is already located in the working directory, then you can stage it, move it to the staging area, and commit the changes.

2. Configuring Git Author Name and Email

Learn how to configure global Git name and email that will be appended to all the commits you will make.

3. Committing Changes

Create your very first Git commit.

4. Exploring Commits History

You have just created your very first Git commit in the Git repository. Now it's time to explore the history of all commits.

5. Basic Git Commands

In this lesson, we are going to talk about basic Git commands such as git status, git add, git commit, git log, and git checkout.

6. Checking Out Commits and Branches

This lesson is a step-by-step guide to check out the commits made and manage the branches created.

7. File Tracking Statuses in Git

In this lesson, we are going to discuss about the file tracking statuses and how we can modify the files we created. There are four file tracking statuses; namely, untracked, unmodified, modified, and staged.

8. Staging and Committing Changes Using One Command

Once we have modified our file and made changes to it, it is now time to commit those changes.


4. Branches and Merging

1. Branches and Merging of the Branches

Branches are needed if you want to work on multiple features in the same project in parallel. A branch is simply a pointer to the specific commit.

2. Branches Merging in Action

Now that we understand how merging branches work, let's see it in action.

3. Exploring Commits Tree Using Graph Option

Let us explore commits utilizing the graph option. To find specific parents for a commit, we need to use the graph option.


5. Working with Remote Repository at GitHub

1. GitHub and Repository Hosting Services Overview

GitHub is a repository hosting site. You can sign up for free and create remote repositories. Remote GitHub repositories can be connected and synchronized with your local Git repositories. Push and pull requests can be performed between the local and remote repositories.

2. Creating Remote Repository at GitHub

In this lesson, we will be creating a remote repository in GitHub and connect it to our local repository.

3. Pushing from the Local Repository to Remote

In this video, we will learn how to perform push operations from the local repository in command line to connect to remote repository and add to GitHub. You will be asked to provide your username and password if you are pushing to GitHub for the first time.

4. Committing at GitHub and Pulling to the Local Repository

Once we are done with our push operations, the changes need to be committed at GitHub followed by pull requests.


6. Exploring Git objects

1. Exploring and Reading Git Objects

We have already discussed the different types of Git objects so in this lesson, we will learn how to explore and read Git objects.

2. Reading Contents of the HEAD File

The Git folder consists of many subfolders among which we have our HEAD file. The contents of a HEAD file point toward a specific branch.


7. Summary

1. Summary

Let's wrap up and quickly go through the things we have learnt through the course.

Course Content

  1. Git and GitHub Crash Course

About The Provider

Packt
Packt
Birmingham
Founded in 2004 in Birmingham, UK, Packt’s mission is to help the world put software to work in new ways, through the delivery of effective learning and i...
Read more about Packt

Tags

Reviews