This ppt will give you a complete understanding of the Git and GitHub. Also you will get to know the basic terminology which is required when you deal with Git and GitHub
2. Basic Terminology
What you will get to know ?
Useful Commands
creating your own repository
What is Git and Github ?
Why Git ?
3. What is git ?
Git is a free and open-source distributed version control system for tracking
changes in
source code
basic goal of having version control system is to keep track of the modifications
made to the source code
git is basically a content tracker.
4. What is version control System ?
manage the files and directories
track changes over time
recall the previous versions
6. What You can do ! Using this ?
Record changes in your project and its files
Revert back to previous states at different points in time
Collaborate with multiple people on one codebase
Develop multiple features at once
7. Why only Git?
Other version control systems, do use a file-based and file modification-based
storage system. So, each revision is composed of a list of differences for each
modified file, i.e the deltas of the files.
Whereas in Git, the whole file is stored. Each revision in Git is like file system. In
each new revision, the modified files are copied, and the files that are not modified,
are linked with the previous revision
8.
9. What is GitHub?
GitHub is an online hosting service for storing Git repositories
GitHub lets you store your repo on their platform.
Another awesome feature that comes with GitHub is the ability to
collaborate with other developers from any location.
10. Repository — Repository is a a place where something is stored in large quantities.
You can keep folders, files, images, videos, spreadsheets and anything else your project
needs.
Local Repo — where you keep your copy of a Git repository on your local machine( PC )
Remote Repo — Git repository where you push changes for collaboration or backup
Master—We usually call the main branch as master. It is the default branch. It is the main
branch of the repository
Origin—the default name for a remote repository
Commit—stores the changes what we made along with a log message from the user
describing the changes.
Branch—is like another repo or different versions which is used to work on by adding different
features.
Terminolog
y
11. Checkout—is a command that is used to switch between branches.
Merge— is a command that is used to merge the changes from one branch to another
branch
Pull— is a command that is used to pull the changes from the remote repository to the
local repository
Push— is a command that is used to push the changes from the local repository to the
remote repository
Status— is a command that is used to show the status of the local repository.
Clone— is a command that is used to clone the remote repository to the local repository.
By clone, we mean that we can able to copy the whole repository locally.
Stash— command can be helpful when we don’t want to commit the changes in the
working branch. But we want to switch the branch
Commands
12. There are three states ?
Modified/Untracked Git views untracked and modified files similarly. Untracked means
that the file is new to your Git project. Modified means that the file has been seen before,
but has been changed
Staged When a file becomes staged, it’s taken into the staging area. This is where Git is
able to take a snapshot of it
Committed means that Git has officially taken a snapshot of the files in the staging area
13.
14. git init
git remote add origin <remote url >
creates a connection between your local repo and the
remote repo on Github
Staging the Changes
git add . or git add “file name”
first commit in git?
git commit -m “commit message“
Pushing updates
git push origin master or git push origin test-
branch
git clone <remote url>
git remote add origin <remote url >
Two
Ways
1.Create your own repo and push it to Github 2.Clone an existing Repo