SlideShare a Scribd company logo
1 of 13
1. Install git and create a GitHub account
2. What is git?
3. Important terminologies in git
4. What is GitHub
5. Quick example using git and GitHub
Windows
https://git-scm.com/download/win
Mac
https://git-scm.com/download/mac
Linux (Debian based distro)
$ sudo apt install git
Linux (Arch based distro)
$ sudo pacman –S git
• Visit: https://github.com
• Click sign up
• Enter your email id and password
Git is version control tool
Now what is version control?
• A system that keeps records of your changes.
• Allows for collaborative development.
• Allows you to know who made what changes and
when.
• Allows you to revert any changes and go back to a
previous state.
• Git was made by Linus Torvald
(founder of Linux kernel) to aid in
linux kernel development
• It was made in 2005
• Uses checksum to ensure
data integrity
• Distributed version control
• Free and opensource!
• Cross platform
• Git tracks changes not
versions
Snapshots:
Git keeps record of all of your files and
their history which makes it possible to go
back to older snapshots.
Commit:
It is command used to create snapshot.
Add:
It is a command used to add
files to snapshot
Repository aka repo:
It contains files and their
history. It can exist locally or
on a remote server (GitHub!)
Branch
Branch contains your
snapshots a repo can have
infinite branches. Usually main
branch is called as master or
main
HEAD
A head is the reference of
most recent commit
Cherry-pick
It is a command used to
add changes from a
remote repository
Merge
It is a command used to
merge a branch from a
remote repository
Init
It is a command used to
initialize a repository
To create a repo you will require to create a dir or a folder. In Windows you can use GUI to so. On Linux
you use cmd
$ mkdir first-repo
Now, first-repo is your directory where you will initialize a repo.
To initialize a repo
$ git init
Now we can start by adding files to our directory lets say we add HelloWorld.java
$ git add HelloWorld.java
We can check what all files are added to commit using git status
$ git status
It should show HelloWorld.java added to the list
Now will finally commit out change using:
$ git commit –m “My first commit”
Note: My first commit is a message we added to our commit message. It is used to track history
It is basically a largest web
hosting platform to host remote
repositories which was recently
bought by Microsoft.
Now there are alternatives to
GitHub, popular ones are Gitlab
and Bitbucket.
Remember we created our first local repo few slides ago? We will push that to GitHub now!
To get started we will have to created a empty repository on GitHub to-do so visit GitHub’s
webpage, sign in into your account and press + on right top of the page. Create a repository
Name and we are halfway done!
Now lets get back to our first-repo dir launch a terminal and type the following commands
git remote add origin https://github.com/SahilSonar/first-repo
(Note: SahilSonar is my GitHub username and first-repo is empty repo I created on GitHub
change it according to your)
git push –u origin master
(It should ask you your username and password. BTW GitHub now uses a token instead of
password make sure you create a token and enter it instead of your actual password)
GitHub provides benefits for students via their student
developer pack which offers free credits on various
cloud services and tools you can checkout here:
https://education.github.com/pack

More Related Content

What's hot

What's hot (20)

git and github
git and githubgit and github
git and github
 
Introduction to Git and Github
Introduction to Git and GithubIntroduction to Git and Github
Introduction to Git and Github
 
Git and Github Session
Git and Github SessionGit and Github Session
Git and Github Session
 
Git slides
Git slidesGit slides
Git slides
 
Git - Basic Crash Course
Git - Basic Crash CourseGit - Basic Crash Course
Git - Basic Crash Course
 
Git real slides
Git real slidesGit real slides
Git real slides
 
Git training v10
Git training v10Git training v10
Git training v10
 
Github
GithubGithub
Github
 
Gitlab flow solo
Gitlab flow soloGitlab flow solo
Gitlab flow solo
 
Git One Day Training Notes
Git One Day Training NotesGit One Day Training Notes
Git One Day Training Notes
 
Introduction to Git
Introduction to GitIntroduction to Git
Introduction to Git
 
Git and GitHub | Concept about Git and GitHub Process | Git Process overview
Git and GitHub | Concept about Git and GitHub Process | Git Process overviewGit and GitHub | Concept about Git and GitHub Process | Git Process overview
Git and GitHub | Concept about Git and GitHub Process | Git Process overview
 
Introduction git
Introduction gitIntroduction git
Introduction git
 
Introduction to Git
Introduction to GitIntroduction to Git
Introduction to Git
 
Introduction to Git and Github
Introduction to Git and Github Introduction to Git and Github
Introduction to Git and Github
 
Git basic
Git basicGit basic
Git basic
 
Git basics
Git basicsGit basics
Git basics
 
Learning git
Learning gitLearning git
Learning git
 
GIT In Detail
GIT In DetailGIT In Detail
GIT In Detail
 
Intro to Git and GitHub
Intro to Git and GitHubIntro to Git and GitHub
Intro to Git and GitHub
 

Similar to Beginner's guide to git and github

introductiontogitandgithub-120702044048-phpapp01.pdf
introductiontogitandgithub-120702044048-phpapp01.pdfintroductiontogitandgithub-120702044048-phpapp01.pdf
introductiontogitandgithub-120702044048-phpapp01.pdf
BruceLee275640
 

Similar to Beginner's guide to git and github (20)

GIT By Sivakrishna
GIT By SivakrishnaGIT By Sivakrishna
GIT By Sivakrishna
 
Git presentation
Git presentationGit presentation
Git presentation
 
Getting started With GIT
Getting started With GITGetting started With GIT
Getting started With GIT
 
Extra bit with git
Extra bit with gitExtra bit with git
Extra bit with git
 
16 Git
16 Git16 Git
16 Git
 
Let's Git this Party Started: An Introduction to Git and GitHub
Let's Git this Party Started: An Introduction to Git and GitHubLet's Git this Party Started: An Introduction to Git and GitHub
Let's Git this Party Started: An Introduction to Git and GitHub
 
Git/GitHub
Git/GitHubGit/GitHub
Git/GitHub
 
Git and Github.pptx
Git and Github.pptxGit and Github.pptx
Git and Github.pptx
 
Introduction to git and github
Introduction to git and githubIntroduction to git and github
Introduction to git and github
 
Introduction to GitHub, Open Source and Tech Article
Introduction to GitHub, Open Source and Tech ArticleIntroduction to GitHub, Open Source and Tech Article
Introduction to GitHub, Open Source and Tech Article
 
Git & Github
Git & GithubGit & Github
Git & Github
 
Beginner Workshop for Student Developers - Tratech-presentation.pdf
Beginner Workshop for Student Developers - Tratech-presentation.pdfBeginner Workshop for Student Developers - Tratech-presentation.pdf
Beginner Workshop for Student Developers - Tratech-presentation.pdf
 
GitHub Basics - Derek Bable
GitHub Basics - Derek BableGitHub Basics - Derek Bable
GitHub Basics - Derek Bable
 
Git installation and configuration
Git installation and configurationGit installation and configuration
Git installation and configuration
 
Brush up on using github
Brush up on using githubBrush up on using github
Brush up on using github
 
Git
GitGit
Git
 
git and github-1.pptx
git and github-1.pptxgit and github-1.pptx
git and github-1.pptx
 
introductiontogitandgithub-120702044048-phpapp01.pdf
introductiontogitandgithub-120702044048-phpapp01.pdfintroductiontogitandgithub-120702044048-phpapp01.pdf
introductiontogitandgithub-120702044048-phpapp01.pdf
 
Version control
Version controlVersion control
Version control
 
Introduction to git hub
Introduction to git hubIntroduction to git hub
Introduction to git hub
 

Recently uploaded

Russian Escort Service in Delhi 11k Hotel Foreigner Russian Call Girls in Delhi
Russian Escort Service in Delhi 11k Hotel Foreigner Russian Call Girls in DelhiRussian Escort Service in Delhi 11k Hotel Foreigner Russian Call Girls in Delhi
Russian Escort Service in Delhi 11k Hotel Foreigner Russian Call Girls in Delhi
kauryashika82
 
Activity 01 - Artificial Culture (1).pdf
Activity 01 - Artificial Culture (1).pdfActivity 01 - Artificial Culture (1).pdf
Activity 01 - Artificial Culture (1).pdf
ciinovamais
 
Gardella_PRCampaignConclusion Pitch Letter
Gardella_PRCampaignConclusion Pitch LetterGardella_PRCampaignConclusion Pitch Letter
Gardella_PRCampaignConclusion Pitch Letter
MateoGardella
 
Seal of Good Local Governance (SGLG) 2024Final.pptx
Seal of Good Local Governance (SGLG) 2024Final.pptxSeal of Good Local Governance (SGLG) 2024Final.pptx
Seal of Good Local Governance (SGLG) 2024Final.pptx
negromaestrong
 

Recently uploaded (20)

INDIA QUIZ 2024 RLAC DELHI UNIVERSITY.pptx
INDIA QUIZ 2024 RLAC DELHI UNIVERSITY.pptxINDIA QUIZ 2024 RLAC DELHI UNIVERSITY.pptx
INDIA QUIZ 2024 RLAC DELHI UNIVERSITY.pptx
 
This PowerPoint helps students to consider the concept of infinity.
This PowerPoint helps students to consider the concept of infinity.This PowerPoint helps students to consider the concept of infinity.
This PowerPoint helps students to consider the concept of infinity.
 
Measures of Dispersion and Variability: Range, QD, AD and SD
Measures of Dispersion and Variability: Range, QD, AD and SDMeasures of Dispersion and Variability: Range, QD, AD and SD
Measures of Dispersion and Variability: Range, QD, AD and SD
 
Unit-IV- Pharma. Marketing Channels.pptx
Unit-IV- Pharma. Marketing Channels.pptxUnit-IV- Pharma. Marketing Channels.pptx
Unit-IV- Pharma. Marketing Channels.pptx
 
APM Welcome, APM North West Network Conference, Synergies Across Sectors
APM Welcome, APM North West Network Conference, Synergies Across SectorsAPM Welcome, APM North West Network Conference, Synergies Across Sectors
APM Welcome, APM North West Network Conference, Synergies Across Sectors
 
Russian Escort Service in Delhi 11k Hotel Foreigner Russian Call Girls in Delhi
Russian Escort Service in Delhi 11k Hotel Foreigner Russian Call Girls in DelhiRussian Escort Service in Delhi 11k Hotel Foreigner Russian Call Girls in Delhi
Russian Escort Service in Delhi 11k Hotel Foreigner Russian Call Girls in Delhi
 
Mattingly "AI & Prompt Design: Structured Data, Assistants, & RAG"
Mattingly "AI & Prompt Design: Structured Data, Assistants, & RAG"Mattingly "AI & Prompt Design: Structured Data, Assistants, & RAG"
Mattingly "AI & Prompt Design: Structured Data, Assistants, & RAG"
 
Activity 01 - Artificial Culture (1).pdf
Activity 01 - Artificial Culture (1).pdfActivity 01 - Artificial Culture (1).pdf
Activity 01 - Artificial Culture (1).pdf
 
Unit-IV; Professional Sales Representative (PSR).pptx
Unit-IV; Professional Sales Representative (PSR).pptxUnit-IV; Professional Sales Representative (PSR).pptx
Unit-IV; Professional Sales Representative (PSR).pptx
 
ICT Role in 21st Century Education & its Challenges.pptx
ICT Role in 21st Century Education & its Challenges.pptxICT Role in 21st Century Education & its Challenges.pptx
ICT Role in 21st Century Education & its Challenges.pptx
 
SOCIAL AND HISTORICAL CONTEXT - LFTVD.pptx
SOCIAL AND HISTORICAL CONTEXT - LFTVD.pptxSOCIAL AND HISTORICAL CONTEXT - LFTVD.pptx
SOCIAL AND HISTORICAL CONTEXT - LFTVD.pptx
 
microwave assisted reaction. General introduction
microwave assisted reaction. General introductionmicrowave assisted reaction. General introduction
microwave assisted reaction. General introduction
 
Holdier Curriculum Vitae (April 2024).pdf
Holdier Curriculum Vitae (April 2024).pdfHoldier Curriculum Vitae (April 2024).pdf
Holdier Curriculum Vitae (April 2024).pdf
 
SECOND SEMESTER TOPIC COVERAGE SY 2023-2024 Trends, Networks, and Critical Th...
SECOND SEMESTER TOPIC COVERAGE SY 2023-2024 Trends, Networks, and Critical Th...SECOND SEMESTER TOPIC COVERAGE SY 2023-2024 Trends, Networks, and Critical Th...
SECOND SEMESTER TOPIC COVERAGE SY 2023-2024 Trends, Networks, and Critical Th...
 
Ecological Succession. ( ECOSYSTEM, B. Pharmacy, 1st Year, Sem-II, Environmen...
Ecological Succession. ( ECOSYSTEM, B. Pharmacy, 1st Year, Sem-II, Environmen...Ecological Succession. ( ECOSYSTEM, B. Pharmacy, 1st Year, Sem-II, Environmen...
Ecological Succession. ( ECOSYSTEM, B. Pharmacy, 1st Year, Sem-II, Environmen...
 
Mattingly "AI & Prompt Design: The Basics of Prompt Design"
Mattingly "AI & Prompt Design: The Basics of Prompt Design"Mattingly "AI & Prompt Design: The Basics of Prompt Design"
Mattingly "AI & Prompt Design: The Basics of Prompt Design"
 
Paris 2024 Olympic Geographies - an activity
Paris 2024 Olympic Geographies - an activityParis 2024 Olympic Geographies - an activity
Paris 2024 Olympic Geographies - an activity
 
Gardella_PRCampaignConclusion Pitch Letter
Gardella_PRCampaignConclusion Pitch LetterGardella_PRCampaignConclusion Pitch Letter
Gardella_PRCampaignConclusion Pitch Letter
 
Basic Civil Engineering first year Notes- Chapter 4 Building.pptx
Basic Civil Engineering first year Notes- Chapter 4 Building.pptxBasic Civil Engineering first year Notes- Chapter 4 Building.pptx
Basic Civil Engineering first year Notes- Chapter 4 Building.pptx
 
Seal of Good Local Governance (SGLG) 2024Final.pptx
Seal of Good Local Governance (SGLG) 2024Final.pptxSeal of Good Local Governance (SGLG) 2024Final.pptx
Seal of Good Local Governance (SGLG) 2024Final.pptx
 

Beginner's guide to git and github

  • 1.
  • 2. 1. Install git and create a GitHub account 2. What is git? 3. Important terminologies in git 4. What is GitHub 5. Quick example using git and GitHub
  • 3. Windows https://git-scm.com/download/win Mac https://git-scm.com/download/mac Linux (Debian based distro) $ sudo apt install git Linux (Arch based distro) $ sudo pacman –S git
  • 4. • Visit: https://github.com • Click sign up • Enter your email id and password
  • 5. Git is version control tool Now what is version control? • A system that keeps records of your changes. • Allows for collaborative development. • Allows you to know who made what changes and when. • Allows you to revert any changes and go back to a previous state.
  • 6. • Git was made by Linus Torvald (founder of Linux kernel) to aid in linux kernel development • It was made in 2005 • Uses checksum to ensure data integrity • Distributed version control • Free and opensource! • Cross platform • Git tracks changes not versions
  • 7. Snapshots: Git keeps record of all of your files and their history which makes it possible to go back to older snapshots. Commit: It is command used to create snapshot. Add: It is a command used to add files to snapshot
  • 8. Repository aka repo: It contains files and their history. It can exist locally or on a remote server (GitHub!) Branch Branch contains your snapshots a repo can have infinite branches. Usually main branch is called as master or main HEAD A head is the reference of most recent commit
  • 9. Cherry-pick It is a command used to add changes from a remote repository Merge It is a command used to merge a branch from a remote repository Init It is a command used to initialize a repository
  • 10. To create a repo you will require to create a dir or a folder. In Windows you can use GUI to so. On Linux you use cmd $ mkdir first-repo Now, first-repo is your directory where you will initialize a repo. To initialize a repo $ git init Now we can start by adding files to our directory lets say we add HelloWorld.java $ git add HelloWorld.java We can check what all files are added to commit using git status $ git status It should show HelloWorld.java added to the list Now will finally commit out change using: $ git commit –m “My first commit” Note: My first commit is a message we added to our commit message. It is used to track history
  • 11. It is basically a largest web hosting platform to host remote repositories which was recently bought by Microsoft. Now there are alternatives to GitHub, popular ones are Gitlab and Bitbucket.
  • 12. Remember we created our first local repo few slides ago? We will push that to GitHub now! To get started we will have to created a empty repository on GitHub to-do so visit GitHub’s webpage, sign in into your account and press + on right top of the page. Create a repository Name and we are halfway done! Now lets get back to our first-repo dir launch a terminal and type the following commands git remote add origin https://github.com/SahilSonar/first-repo (Note: SahilSonar is my GitHub username and first-repo is empty repo I created on GitHub change it according to your) git push –u origin master (It should ask you your username and password. BTW GitHub now uses a token instead of password make sure you create a token and enter it instead of your actual password)
  • 13. GitHub provides benefits for students via their student developer pack which offers free credits on various cloud services and tools you can checkout here: https://education.github.com/pack