
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.
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.
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:
Initialize new Git repository
Make changes, add them to staging area and commit
Create branches, checkout branches and merge branches
Perform fast-forward and 3-way merges of the branches
Resolve merge conflicts
Move into detached HEAD state and make experimental commits there
Perform rebasing of the branches
You will also learn and practice different GitHub features
Connect local and remote repositories
Pushing, fetching and pulling operations
Open Pull Request
Merge Pull Request
Add software versions using Git Tags
Create forks from other repositories
Contribute to public repositories using technique of forks and pull requests
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 UNDERSTAND Git.
You will also get 30-days money-back guarantee. No questions asked!
Don't wait and join the course now!