2. VERSION CONTROL
My project Final project Final project - new
feature
Final Project -
another feature
Final-Final project Fully-final
project
3. HOW DOES GIT HELP IN
VERSION CONTROL
New feature
Final project
(Version 2.0)
Final project
(Version 2.2)
My project
(Version 1.0)
Final project
(Version 2.1)
Another
feature Final-final project
(Version 3.0)
Git just tracks these
changes
4. BASIC GIT COMMANDS
git init To start tracking changes
To track changes in
<filename>
To save the changes in a
checkpoint
git add <filename>
git commit -m “message”
git status To check the status of changes
git log To see all saved checkpoints
git checkout
<hash_value>
To return to the checkpoint
5. BRANCHES AND HEAD
● All commits live on a branch.
● A repo can contain many
branches.
● The main branch is usually
called ‘master’.
● ‘HEAD’ refers to the most
recent commit on a branch.
Beginning of
MASTER
branch
BRANCH-1
made from
master
BRANCH-2
made from
master
6. GITHUB - THE BASICS
CREATE
ISSUES
OPEN SOURCE
GITHUB
GitHub is a provider of Internet hosting for
open source software development and
version control using Git.
COLLABORATION
REMOTE
REPOSITORIES
PULL
REQUESTS
7. HOW TO CONTRIBUTE
INITIALIZE
REPOSITORY
First step is to
create your repo by
cloning or adding a
remote and initialize
it with git
MAKE YOUR
CHANGES
COMMIT
TRACK
YOUR
CHANGES
MAY 30
Next step is to
stage the edits you
made for git to track
the changes
Lastly, push all the
commits you made
to your forked repo
on GitHub
Save your progress
by committing
which acts as a
checkpoint
Then make suitable
edits in your branch
PUSH IT
CREATE YOUR
BRANCH
Create your branch
for testing changes
you made
8. GIT COMMANDS FOR
CONTRIBUTION
git clone “url” To clone a project to local device
To start tracking changes
To create and move to the new
branch
git init
git checkout -b <branch_name>
git commit -m “message” To save all of the changes
git push -u origin <branch_name> To push current code to remote
git add . To track all changes in all files