0% found this document useful (0 votes)
15 views22 pages

Introduction to Git and GitHub Ppt

This document provides an introduction to Git and GitHub, covering version control systems, basic command line interface commands, and essential Git commands for managing repositories. It explains how to set up Git and GitHub, including creating a repository and using commands for tracking changes, branching, and collaborating. Additionally, it outlines the workflow for contributing to projects on GitHub and includes a final quiz for assessment.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
15 views22 pages

Introduction to Git and GitHub Ppt

This document provides an introduction to Git and GitHub, covering version control systems, basic command line interface commands, and essential Git commands for managing repositories. It explains how to set up Git and GitHub, including creating a repository and using commands for tracking changes, branching, and collaborating. Additionally, it outlines the workflow for contributing to projects on GitHub and includes a final quiz for assessment.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 22

Introduction to

Git and GitHub


Ready To Learn?
01
What will we be
learning today?
What is a Version Control
Basic CLI Commands
Introduction to Git
Setting up VS Code
Introduction to GitHub
Final Quiz
What is a Version Control System?
Let's Visualize

You are a designer

poster.png final-poster.png final-final-poster.png pls-stop.png


What is Version Control System?
Version Control System manages the entire process
of version and keeps the track of the changes made.

We need VCS to:


track the changes made,
revert back to any versions when needed,
compare the changes made between any two
versions,
to know information like who, when, why made
the changes,
to get all these benefits with minimal effort.
02

Before we learn Git


Let's learn about CLI
Command line Interface Graphical User Interface
Basic CLI Commands

$ pwd
Prints the full name (the full path) of
current/working directory
Changes the working directory to Desktop.
$ cd Desktop
Use this to navigate around CLI

$ ls List directory contents.

$ mkdir name Create a new directory called name.

$ rm file.txt Removes the file file.txt

Let's Try it!


What is Git?
Git is a free and open
Let's Install Git
source distributed version https://git-scm.com/downloads
control system designed
to handle everything from
small to very large Let's Install VSC
projects with speed and
https://code.visualstudio.com/
efficiency.
Setup Git
Check version
$ git --version

Add in your name


$ git config --global user.name “[firstname lastname]”

Add in your email id


$ git config --global user.email “[valid-email]”

Initialize an existing directory as a Git repo


$ git init
How Git works
Git Commands

It displays the state of working tree and staging area.


$
git status

It starts to track a fileby adding it to the staging area


$
git add [file]

It unstages the file


$
git reset [file]
Git Commands
It commits your changes and captures a new snapshot
$ git commit -m "Some valuable message"

It displays all the commits in the current branch.


$ git log

Branching
Git Commands
List your branches
$ git branch

Creates a new branch from the current commit


$ git branch [name]

Switchs to another branch


$ git checkout [name]

Merges the specified branch’s history into the current one


$ git merge [branch]
Git ignore
What is GitHub
Till now, we have all the changes made
saved in our local system only.
To host our repository online, we need
a server or hosting platform.
GitHub is a repository hosting platform
that uses Git in its core.

Let's make an account!


Free Goodies

Btech-FY
Some More Git Commands
Add a remote repo link
$ git remote add origin [link]

Push local repo changes to remote repo


$ git push

Fetch and merge changes from remote repo


$ git pull

Retrieve an hosted repository from a URL


$ git clone [link]
Some Terminologies
Fork: A fork is a copy of a repository that allows you to
freely experiment with changes without affecting the original
project.
Pull requests: A PR is request sent to the repo to merge new
commits into the repo.
Issues: Issues is what it sounds. It can be a new feature, bug,
documentation problem and many more.
Workflow to Contribute
01 02 03 04
Find a issue or Suggest a Ask the maintainer to Fork and Clone the Branch and make
feature assign the issue Repo changes

05 06 07 08
Commit your changes Create a Pull Request Listen to Review and Hurray! 🥳 The PR got
do changes if needed accepted
It's Quizin Time
Thank You!

You might also like