Sorry, this page is no longer available
We may earn an affiliate commission when you visit our partners.
Course image
Bogdan Stashchuk | 300K Students Worldwide | MBA, PhD

This course is all about Git and GitHub.

Understand HOW Git works and learn all Git features from basic commits to squashing and rebasing.

  • Blobs, Trees, Annotated tags, SHA1 hashes

If those terms are new to you - jump in and you will learn all about Git internals and afterwards practice basic and advanced Git features using multiple practice activities.

Become a master of Git, GitHub, GitHub Desktop, SourceTree and Visual Studio Code.

Read more

This course is all about Git and GitHub.

Understand HOW Git works and learn all Git features from basic commits to squashing and rebasing.

  • Blobs, Trees, Annotated tags, SHA1 hashes

If those terms are new to you - jump in and you will learn all about Git internals and afterwards practice basic and advanced Git features using multiple practice activities.

Become a master of Git, GitHub, GitHub Desktop, SourceTree and Visual Studio Code.

This is the most complete practical Git and GitHub guide here on Udemy that includes tons of practical activities. Most important is that you will learn how Git works and knowing it you will be able much more easier use Git features and fix mistakes in your development workflow. You can have zero knowledge about Git and GitHub. All will be taught from scratch, from basic to advanced features. If you want to get deep knowledge of Git and GitHub this course is for you.

We will start by exploring internal structure of the Git repository. You will learn that Git has 4 types of objects: blobs, trees, commits and annotated tags. Each object has unique SHA1 hash. Also all objects are stored in the folders. Every object has just single reference to it - SHA1 hash. Files are stored in blobs. Filenames are stored in other Git objects called trees.

I will explain you how to create new Git objects without using git commit and git add. After creating Git object in the Git repository you will checkout it to staging area and working directory (opposite direction to traditional Git flow)

Afterwards we will jump into tons of practice activities and use different Git and GitHub features

In practice sections you will perform multiple practice Git activities:

  1. Initialize new Git repository

  2. Make changes, add them to staging area and commit

  3. Create branches, checkout branches and merge branches

  4. Perform fast-forward and 3-way merges of the branches

  5. Resolve merge conflicts

  6. Move into detached HEAD state and make experimental commits there

  7. Perform rebasing of the branches

You will also learn and practice different GitHub features

  1. Connect local and remote repositories

  2. Pushing, fetching and pulling operations

  3. Open Pull Request

  4. Merge Pull Request

  5. Add software versions using Git Tags

  6. Create forks from other repositories

  7. Contribute to public repositories using technique of forks and pull requests

  8. Perform rebasing with squashing

You will use not just terminal and shell commands for performing Git operations. In parallel you will also use GUI applications that simplify routine day-by-day Git operations:

  • GitHub Desktop

  • SourceTree

  • VisualStudio Code

With this course you will get lifetime-long access to almost 200 lectures and tens of practical exercises. After the course you will become a guru of Git and GitHub and will be able easily perform basic and advanced Git tasks.

But most important is that you will

You will also get 30-days money-back guarantee. No questions asked.

Don't wait and join the course now.

Enroll now

What's inside

Learning objectives

  • Deeply understand how git works under the hood
  • Use git not just in terminal but also in graphical user interfaces like github desktop, sourcetree, visual studio code
  • Learn different git objects - blobs, trees, commits and annotated tags
  • Create local and remote git repositories
  • Perform basic and advanced git operations
  • Learn how to perform rebasing and merging of the branches
  • Learn what is pull request and how to create pull request at github
  • Contribute to public repositories using technique of forks and pull requests from the forked repository
  • Understand what is semantic versioning and how to use git tags in order to create software release versions
  • Learn advanced git operations - squashing, cherry-picking, amending, reverting commits.

Syllabus

Introduction to the Git and GitHub

Welcome to the Git course! In this introduction lecture I will give you a quick overview of the course and tell you what will be covered in different sections.

Read more

Introduction for the first section of the course where I will compare Git and GitHub

What is the difference between Git and GitHub? Let's discuss it in this lecture!

In this section you will install Git on your computer and configure Shell

If you use Mac OS this lesson is for you. I will show you how to install Git on Mac.

If you use Windows, this lecture is for you. I will show you here how to install Git on Windows.

Installation of Git on Linux is very simple. In this lecture I will demonstrate you how to do it.

If you use Mac I highly suggest you to install custom Terminal called iTerm2 and use it instead of built-in Terminal.

Along with iTerm2 it's a nice idea to install also custom shell called Z-Shell. In this video I will guide you through this process.

In this course you and I will heavily use Shell. In this section I will show you basic commands that you will use for different operations like creation of new folders, files etc.

In this lecture I will demonstrate you how to perform directory management in Shell.

In this lecture I'll demonstrate you how to perform file management using Shell. You will learn how to read files the how to edit files using such editors like Nano.

In this lecture we will continue discussion of file management commands in Shell and the I'll demonstrate you some examples.

It is very important to understand how Git works under the hood. That's why let me quickly go over topic we will discuss in this large section.

First step in the management of repositories is the creation of the new Git repository. In this lecture I will show you how to perform initialisation of the new Git repository.

After initialisation of the new Git repository you will see that Git will create .git folder. And in this lecture I'll show you contents of this .git folder.

Let me now explain you which object types Git could store in the  .git folder.

It is possible to insert the new object into the Git repository with git hash-object command. And in this lecture I'll demonstrate you how to perform this task yourself manually.

Structure of the Git repository is very similar to JSON structure. And in this lecture I'll demonstrate you what are the similarities and what are the differences between JSON and Git repository.

Every object that is stored in the Git repository is stored with unique name. And this unique name is generated using SHA1 hash function. In this lecture I'll tell you what is hash function and how it works.

There are different hash functions available. In this lecture I will explain you difference between some hash functions and tell you which hash function is used in Git.

SHA1 hash function generates hash that is 160 bits long. And exactly this hash function is used in Git for creation of the unique id for every object like Git blob, tree or commit.

You already know that Git creates unique hashes for every file that is stored in the repository. And here I want to explain you how many files in total Git could store in the Git repository.

Let me know get the back to the very simple Dice game and explain you some basics of probability theory and how it could be applied to Git.

Let me know talk about the probability of getting exactly the same numbers in the Dice game and same hashes in the Git repository

It is possible to read Git objects using specific command that is called git cat-file. With this command you are able to read the contents of specific object in the Git repository. Also you are able to read the type of the object and it's length.

In this lesson I'll demonstrate you how you are able to create new Git blob in the Git repository from the contents of specific file.

In fact Git does not store file names along with every blob. Every blob has unique filename that  is based on the SHA1 hash of this file. That's why Git needs to store filenames somewhere else.

Every Git object has specific structure. Git stores following data in every object: type, length, delimiter and content.

We have just discussed some internals of Git and now you know how Git stores every object in the Git repository.

There are four different types of Git objects. They are blob, tree, commit and annotated tag. Let me now explain you what is the purpose of the tree objects in Git.

Git tree object stores actual filenames and SHA1 hashes for every blob. Also it stores file permissions of every blob. In this lecture I want to tell you about the different possible object permissions.

You could create new Git tree object manually. Now let me demonstrate how you are able to do that.

Let's now examine contents of the Git tree object.

Let me know talk about the difference between working directory, staging area and git repository.

Let me now show you where all files that we have created before are located in terms of working directory, staging area and Git repository.

Let me know show you how you're able to use such command as git read-tree.

Sometimes it's useful to read files that are located in the staging area. You could read the files in the staging area using command git ls-files.

You could move files from the Git repository to the staging area using command git checkout-index.

Let's now calculate how many different folders could be created in the Git repository

Let's now summarise what we have discussed in this large section dedicated to the Git internals.

In this section we will talk about the basic Git operations. I will explain you how to create a new commit, how to perform management of the git repository, how to add the files to the staging area, how to remove files from the staging area and so on.

Let me now explain you what is commit and why it is needed.

Before starting using Git you should configure global Git name and email that will be appended to all commits you will make.

Let's now finally create you very first commit in your very first git Project

We have just created the very first commit in the Git repository. Now it's a good time to explore contents of this commit object.

Now let me briefly overview current state of our project.

We have just created very first commit in the repository. Now let's talk about basic Git comments like git status, git log and git checkout.

Now let me demonstrate you how you're able to add the new file to the working directory in Git.

Every file has its own lifecycle and there are several possible locations where files could be stored in Git. File could be located in the working directory, staging area or repository.

If file is already located to in the working directory you are able to stage this file and move it to staging area as well. This process is called "stage file".

If specific file is already present in the Git staging area you are able to remove it from the staging area using git rm command

If some files are already present in the working directory and staging area it's a good time to commit them. And here I'll explain you what happens when you commit changes.

As you see every file in Git could be either untracked or modified, or staged, or unmodified. Let's now explore changes in our Git repository.

At the moment in the Git repository there are two different commit objects, two different tree objects and three different blobs. Let me explain you all of that using a graphical diagram.

In this section we will talk about the Git branches and Git HEAD. I will explain you how to create a new branch of how to switch between different branches

No I will explain you how to move files between working directory, staging area and Git repository. I will show you how to use following commands: git add, get commit and git checkout.

Let's explore the structure of the project at this moment of time. At the moment there are three different blobs, two different trees and 2 commits.

GitHub Desktop is a very useful GUI application and using the GitHub Desktop you could easily manage multiple Git repositories and perform different Git actions.

Let me now explain you most common features of the GitHub Desktop and I'll explain you how to add Git repository and how to explore it inside of the GitHub Desktop

Branch in Git is a simple pointer to specific commit and in this lecture I'll explain you features of the branch in Git

In Git there is specific term called HEAD and in this lecture I will explain you what is HEAD and how it is used in Git

At the moment there are two different commits and now it's a good time to create one more commit and afterwards we will explore changes in Git repository after this third commit

We have just created one more commit in the Git repository and now let's explore what was changed in the repository after this last commit. There will be actually one more commit object and one more tree object.

Now you know that the HEAD points to the currently checked out branch. In this lecture let me show you how you could checkout specific commit by using its SHA1 hash.

Let me now explain you why we need branches. Branches are needed if you want to work on multiple features in the same project in parallel. And branch is simply pointer to the specific commit.

Let me now quickly explain you how you could manage multiple branches in the same Git repository.

You could quickly and easily create a new Git branch by using the git branch command. Also you could use a git checkout command with option -b in order to create new branch and immediately switch to this newly created branch.

Let's now create new branch and switch to it. Afterwards lets make some changes there and commit those changes.

We have just created a new branch and made some changes in this new branch. Afterwards we have committed those changes. Now let's explore changes made in the last commit in the new branch.

Now let me talk about very important Git feature. Git re-uses blobs with the same content. There is no need to create new blob if there is already blob with the same contents in Git repository.

Save this course

Create your own learning path. Save this course to your list so you can find it easily later.
Save

Activities

Coming soon We're preparing activities for The Complete Git Guide: Understand and master Git and GitHub. These are activities you can do either before, during, or after a course.

Career center

Learners who complete The Complete Git Guide: Understand and master Git and GitHub will develop knowledge and skills that may be useful to these careers:
Open Source Software Developer
Open Source Software Developers contribute to collaborative projects whose source code is publicly available, often working across geographical boundaries. For an Open Source Software Developer, an unparalleled mastery of Git and GitHub is the absolute cornerstone of their daily work. This course is specifically tailored to equip you with the precise skills needed to thrive in this environment, from understanding how to create forks and manage local and remote repositories to submitting impactful pull requests to public projects. Deeply understanding Git internals, advanced operations like rebasing and squashing, and using Git Tags for versioning are all critical for making high-quality contributions and navigating community processes. This comprehensive training prepares you to effectively collaborate, maintain, and innovate within the global open-source ecosystem.
Software Engineer
Software Engineers are at the forefront of building the digital world, writing, testing, and deploying the applications and systems we use daily. This course is exceptionally well-suited for aspiring and current Software Engineers, as robust version control is the bedrock of modern software development. It helps build proficiency in managing code changes, collaborating effectively within a team, and maintaining project integrity. Mastering Git and GitHub, from understanding internal objects like blobs and trees to advanced operations such as rebasing and pull requests, equips you with the essential tools for handling complex codebases, contributing to diverse projects, and ensuring a smooth development workflow. This deep understanding of how Git works, combined with practical application using various tools, directly translates into a significant advantage in any software engineering role.
Full-Stack Developer
A Full Stack Developer designs, builds, and maintains both the client-side and server-side of web applications, requiring a comprehensive skill set. For a Full Stack Developer, an in-depth understanding of Git and GitHub is absolutely critical for managing vast codebases that span multiple technologies and environments. This course helps you efficiently track changes, integrate features from various team members, and manage different versions of your application. Mastering concepts like creating branches, resolving merge conflicts, and performing rebasing is essential for maintaining a clean, functional codebase across frontend and backend components. The practical experience with local and remote repositories, pull requests, and GUI tools cultivates the collaborative practices vital for success in this dynamic role.
Backend Developer
Backend Developers focus on the server-side logic, databases, APIs, and the overall architecture that powers applications, demanding meticulous code management. For a Backend Developer, an expert command of Git and GitHub is fundamental for versioning complex business logic, database migrations, and API definitions. This course helps you manage changes to critical systems with precision, facilitating seamless collaboration with other developers and ensuring system stability through robust version control. Understanding Git internals, performing advanced operations like squashing and cherry-picking, and utilizing Git Tags for releases provides the control needed for maintaining integrity across development cycles. The practical skills gained in managing repositories and resolving conflicts are directly applicable to building resilient backend systems.
Frontend Developer
Frontend Developers craft the user interface and user experience of websites and applications, translating design into interactive digital experiences. For a Frontend Developer, mastery of Git and GitHub is paramount for managing evolving UI components, styling, and client-side logic. This course helps you track frequent changes, experiment with new features on separate branches, and seamlessly integrate your work with design systems and backend APIs. Proficiency in creating branches, merging updates, and using GUI tools like Visual Studio Code for Git operations streamlines your workflow and collaboration with designers and other developers. A deep understanding of Git ensures that visual consistency and functionality are maintained throughout the development lifecycle, allowing for confident deployment of user-facing features.
DevOps Engineer
DevOps Engineers bridge the gap between development and operations, automating software delivery and infrastructure management. For a DevOps Engineer, proficiency with Git and GitHub is indispensable, as it forms the backbone of Continuous Integration and Continuous Delivery pipelines and Infrastructure as Code practices. This course helps you deeply understand version control mechanics, crucial for managing configuration files, automation scripts, and deployment workflows. Learning advanced Git operations like branching, merging, squashing, and Git Tags for semantic versioning directly aids in maintaining consistent, reproducible environments and orchestrating smooth releases. The ability to manage local and remote repositories, perform pull requests, and contribute to public repositories prepares you for collaborative, highly automated environments.
Release Engineer
Release Engineers manage the software release lifecycle, ensuring that new versions are deployed smoothly, reliably, and on schedule. For a Release Engineer, an expert command of Git and GitHub is absolutely crucial, as it is the primary tool for defining branching strategies, managing release branches, and tagging official software versions. This course helps you gain a deep understanding of Git internals and advanced operations like rebasing, squashing, cherry-picking, and amending, which are essential for cleaning up history and preparing release candidates. Learning how to use Git Tags for semantic versioning directly enables the precise labeling and tracking of every software release. Proficiency in managing remote repositories, forks, and pull requests is indispensable for orchestrating complex deployments across diverse environments.
Research Software Engineer
Research Software Engineers develop and maintain specialized software tools and infrastructure to support scientific research and data analysis. For a Research Software Engineer, an expert understanding of Git and GitHub is indispensable for managing complex scientific codebases, ensuring reproducibility, and facilitating open science practices. This course helps you version control research algorithms, data processing pipelines, and experimental code, making your work auditable and shareable. Mastering Git internals, advanced branching strategies, and operations like squashing and rebasing is crucial for maintaining clean, well-documented code histories. The ability to use pull requests, create forks, and contribute to public repositories directly aligns with collaborative research and disseminating scientific software within the academic community. This role often benefits from an advanced degree.
Site Reliability Engineer
Site Reliability Engineers are responsible for the availability, latency, performance, efficiency, monitoring, emergency response, and capacity planning of services. For a Site Reliability Engineer, mastering Git and GitHub is fundamental for managing configuration as code, automation scripts, and incident response playbooks. This course helps you version control critical infrastructure configurations, ensuring reproducibility and enabling rapid rollback in case of issues. Understanding Git's internals, advanced branching strategies, and merging techniques directly supports collaborative development and deployment of reliability tools. The ability to contribute to public repositories and manage forks, combined with practical command-line and GUI experience, equips you to maintain robust, version-controlled systems that are essential for high-uptime services.
Machine Learning Engineer
Machine Learning Engineers design, build, and deploy intelligent systems, bridging the gap between theoretical models and production applications. For a Machine Learning Engineer, a profound understanding of Git and GitHub is essential for managing code, model versions, datasets, and experiment configurations. This course helps you implement robust version control strategies within MLOps pipelines, ensuring reproducibility and traceability of your models. Mastering advanced Git operations like branching, merging, and especially using Git Tags for semantic versioning directly aids in tracking model releases and managing different iterations of your machine learning projects. The practical skills in managing repositories, resolving conflicts, and collaborating via pull requests are critical for team-based ML development and deployment. This role often benefits from an advanced degree.
Cloud Engineer
Cloud Engineers design, deploy, and manage cloud-based infrastructure and services, leveraging platforms like AWS, Azure, or Google Cloud. For a Cloud Engineer, an in-depth understanding of Git and GitHub is paramount for implementing Infrastructure as Code (IaC) principles. This course helps you version control cloud configuration files, deployment scripts, and automation templates, ensuring consistency, auditability, and collaboration across environments. Mastering Git concepts such as branching for environment-specific configurations, pull requests for team collaboration, and Git Tags for versioning infrastructure deployments is critical for maintaining reliable and scalable cloud resources. The practical experience with local and remote repositories directly prepares you for managing complex cloud infrastructure in a programmatic and version-controlled manner.
Game Developer
Game Developers create video games across various platforms, encompassing programming, design, and often managing large assets. For a Game Developer, proficiency in Git and GitHub is extremely beneficial for version controlling game code, scripts, and even some text-based assets, facilitating team collaboration. This course helps you manage complex project files, track changes made by multiple team members, and experiment with new features on separate branches without disrupting the main development line. Understanding Git internals and advanced operations like branching, merging, and resolving conflicts is critical for integrating diverse contributions into a cohesive game. The practical skills in using Git with GUI tools are particularly helpful for managing large projects where visual feedback on changes can streamline development workflows.
Data Scientist
Data Scientists analyze complex datasets to extract insights, build predictive models, and guide strategic decisions, often using code-based tools. For a Data Scientist, while not traditionally a core programming role, Git and GitHub are increasingly vital for versioning analytical scripts, machine learning models, and reproducible research notebooks. This course helps you manage experiment iterations, collaborate on data pipelines, and ensure the traceability of your work, which is crucial for scientific rigor and team projects. Learning to create local and remote repositories, commit changes, and use Git Tags for model versions directly supports the development of robust, auditable data science workflows. The ability to contribute to public repositories also opens avenues for sharing research and collaborating within the broader scientific community.
Technical Writer
Technical Writers produce clear, concise documentation for software, APIs, and complex systems, making technology accessible to users and developers. For a Technical Writer, especially in a development-focused environment, proficiency in Git and GitHub is becoming increasingly valuable for managing documentation alongside code repositories. This course helps you integrate seamlessly into development workflows, allowing you to track changes to documentation, collaborate with engineers, and publish updates efficiently. Understanding concepts like branching for new features, pull requests for review cycles, and basic Git operations allows you to maintain versioned documentation assets, ensuring they remain synchronized with software releases. This approach, often called "docs as code," is highly sought after and directly supported by mastering Git and GitHub.
Quality Assurance Engineer
Quality Assurance Engineers ensure software products meet specific standards and requirements, identifying defects and improving overall product quality. For a Quality Assurance Engineer, this course may be useful as it provides insight into the development workflow and how code changes are managed. Understanding Git and GitHub helps in pulling specific code branches for testing, reviewing code changes associated with bug fixes or new features, and managing test scripts or automation frameworks. Familiarity with Git concepts like commits, branches, and pull requests can facilitate better communication with development teams and allow for independent verification of software versions. While not a primary tool for all QA, a grasp of version control can enhance collaboration and efficiency in testing processes.

Reading list

We haven't picked any books for this reading list yet.
Provides a deep dive into the internals of Git. It covers how Git stores data, how it performs operations, and how it can be customized.
Practical guide to using Git for version control. It covers all the essential commands and concepts, and provides clear and concise explanations.
Fun and engaging way to learn Git. It provides short and easy lessons that can be completed in a month.
Concise and easy-to-use reference guide to Git. It covers all the essential commands and concepts, and great resource for quick lookups.
Comprehensive and up-to-date reference guide to Git. It covers all the essential commands and concepts, and provides clear and concise explanations.
This influential book explores the dynamics and principles of open-source software development, providing valuable insights into the collaborative nature of GitHub.
Shares best practices and effective workflows for using Git and GitHub, helping developers improve their productivity and collaboration.
Teaches the fundamentals of Git through practical exercises, providing a structured approach for beginners to master GitHub's core concepts.
This concise and practical guide provides a quick reference for Git commands and workflows, making it a convenient companion for developers using GitHub.
This comprehensive guide to software engineering covers various aspects of software development, including version control and collaboration, making it a valuable resource for GitHub users.
This comprehensive guide covers all aspects of version control with Git, making it a valuable resource for developers looking to master GitHub's core functionality and underlying concepts.
Emphasizes the importance of writing clear and readable code, which is crucial for effective collaboration on GitHub and maintaining high-quality codebases.
While not directly focused on GitHub, this book provides a detailed overview of the concepts and practices of version control, which are fundamental to understanding GitHub.
This beginner-friendly guide introduces the basics of GitHub, covering essential concepts and workflows for individuals new to the platform.
Provides a comprehensive overview of the Perforce Helix version control system. It covers a wide range of topics, including basic concepts, advanced workflows, and best practices. It valuable resource for experienced Perforce Helix users who want to improve their skills.
Provides a comprehensive overview of the Subversion version control system. It covers a wide range of topics, including basic concepts, advanced workflows, and best practices. It valuable resource for experienced Subversion users who want to improve their skills.
Comprehensive guide to the Git version control system. It covers a wide range of topics, including basic concepts, advanced workflows, and best practices. It valuable resource for experienced Git users who want to improve their skills.
Provides a comprehensive overview of the Git version control system, including its basic concepts, commands, and workflows. It is an excellent resource for beginners and intermediate users who want to improve their understanding of Git.

Share

Help others find this course page by sharing it with your friends and followers:

Similar courses

Similar courses are unavailable at this time. Please try again later.
Our mission

OpenCourser helps millions of learners each year. People visit us to learn workspace skills, ace their exams, and nurture their curiosity.

Our extensive catalog contains over 50,000 courses and twice as many books. Browse by search, by topic, or even by career interests. We'll match you to the right resources quickly.

Find this site helpful? Tell a friend about us.

Affiliate disclosure

We're supported by our community of learners. When you purchase or subscribe to courses and programs or purchase books, we may earn a commission from our partners.

Your purchases help us maintain our catalog and keep our servers humming without ads.

Thank you for supporting OpenCourser.

© 2016 - 2025 OpenCourser