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 (20)

Git training v10
Git training v10Git training v10
Git training v10
 
Git basics
Git basicsGit basics
Git basics
 
Git and git flow
Git and git flowGit and git flow
Git and git flow
 
Introducing GitLab
Introducing GitLabIntroducing GitLab
Introducing GitLab
 
Git and github
Git and githubGit and github
Git and github
 
Git commands
Git commandsGit commands
Git commands
 
Git and Github
Git and GithubGit and Github
Git and Github
 
Git Tutorial I
Git Tutorial IGit Tutorial I
Git Tutorial I
 
Introduction to github slideshare
Introduction to github slideshareIntroduction to github slideshare
Introduction to github slideshare
 
Git Version Control System
Git Version Control SystemGit Version Control System
Git Version Control System
 
A prentation on github
A prentation on githubA prentation on github
A prentation on github
 
Git flow Introduction
Git flow IntroductionGit flow Introduction
Git flow Introduction
 
git and github
git and githubgit and github
git and github
 
Github
GithubGithub
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 and GitHub
Git and GitHubGit and GitHub
Git and GitHub
 
Git & GitLab
Git & GitLabGit & GitLab
Git & GitLab
 
Git and Github Session
Git and Github SessionGit and Github Session
Git and Github Session
 
Introduction to git hub
Introduction to git hubIntroduction to git hub
Introduction to git hub
 
The everyday developer's guide to version control with Git
The everyday developer's guide to version control with GitThe everyday developer's guide to version control with Git
The everyday developer's guide to version control with Git
 

Similar to Beginner's guide to git and github

Getting started With GIT
Getting started With GITGetting started With GIT
Getting started With GITGhadiAlGhosh
 
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 GitHubKim Moir
 
Git and Github.pptx
Git and Github.pptxGit and Github.pptx
Git and Github.pptxHitesh670643
 
Introduction to git and github
Introduction to git and githubIntroduction to git and github
Introduction to git and githubAderemi Dadepo
 
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.pdfGDSCKNUST
 
Git installation and configuration
Git installation and configurationGit installation and configuration
Git installation and configurationKishor Kumar
 
Brush up on using github
Brush up on using githubBrush up on using github
Brush up on using githubSebin Benjamin
 
git and github-1.pptx
git and github-1.pptxgit and github-1.pptx
git and github-1.pptxtnscharishma
 
introductiontogitandgithub-120702044048-phpapp01.pdf
introductiontogitandgithub-120702044048-phpapp01.pdfintroductiontogitandgithub-120702044048-phpapp01.pdf
introductiontogitandgithub-120702044048-phpapp01.pdfBruceLee275640
 
Introduction to git and Github
Introduction to git and GithubIntroduction to git and Github
Introduction to git and GithubWycliff1
 
Intro to Git for Drupal 7
Intro to Git for Drupal 7Intro to Git for Drupal 7
Intro to Git for Drupal 7Chris Caple
 

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
 
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
 
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
 
Hello, Git!
Hello, Git!Hello, Git!
Hello, Git!
 
Introduction to git and Github
Introduction to git and GithubIntroduction to git and Github
Introduction to git and Github
 
Intro to Git for Drupal 7
Intro to Git for Drupal 7Intro to Git for Drupal 7
Intro to Git for Drupal 7
 

Recently uploaded

Solving Puzzles Benefits Everyone (English).pptx
Solving Puzzles Benefits Everyone (English).pptxSolving Puzzles Benefits Everyone (English).pptx
Solving Puzzles Benefits Everyone (English).pptxOH TEIK BIN
 
Framing an Appropriate Research Question 6b9b26d93da94caf993c038d9efcdedb.pdf
Framing an Appropriate Research Question 6b9b26d93da94caf993c038d9efcdedb.pdfFraming an Appropriate Research Question 6b9b26d93da94caf993c038d9efcdedb.pdf
Framing an Appropriate Research Question 6b9b26d93da94caf993c038d9efcdedb.pdfUjwalaBharambe
 
call girls in Kamla Market (DELHI) 🔝 >༒9953330565🔝 genuine Escort Service 🔝✔️✔️
call girls in Kamla Market (DELHI) 🔝 >༒9953330565🔝 genuine Escort Service 🔝✔️✔️call girls in Kamla Market (DELHI) 🔝 >༒9953330565🔝 genuine Escort Service 🔝✔️✔️
call girls in Kamla Market (DELHI) 🔝 >༒9953330565🔝 genuine Escort Service 🔝✔️✔️9953056974 Low Rate Call Girls In Saket, Delhi NCR
 
EPANDING THE CONTENT OF AN OUTLINE using notes.pptx
EPANDING THE CONTENT OF AN OUTLINE using notes.pptxEPANDING THE CONTENT OF AN OUTLINE using notes.pptx
EPANDING THE CONTENT OF AN OUTLINE using notes.pptxRaymartEstabillo3
 
Painted Grey Ware.pptx, PGW Culture of India
Painted Grey Ware.pptx, PGW Culture of IndiaPainted Grey Ware.pptx, PGW Culture of India
Painted Grey Ware.pptx, PGW Culture of IndiaVirag Sontakke
 
CELL CYCLE Division Science 8 quarter IV.pptx
CELL CYCLE Division Science 8 quarter IV.pptxCELL CYCLE Division Science 8 quarter IV.pptx
CELL CYCLE Division Science 8 quarter IV.pptxJiesonDelaCerna
 
Proudly South Africa powerpoint Thorisha.pptx
Proudly South Africa powerpoint Thorisha.pptxProudly South Africa powerpoint Thorisha.pptx
Proudly South Africa powerpoint Thorisha.pptxthorishapillay1
 
Introduction to AI in Higher Education_draft.pptx
Introduction to AI in Higher Education_draft.pptxIntroduction to AI in Higher Education_draft.pptx
Introduction to AI in Higher Education_draft.pptxpboyjonauth
 
POINT- BIOCHEMISTRY SEM 2 ENZYMES UNIT 5.pptx
POINT- BIOCHEMISTRY SEM 2 ENZYMES UNIT 5.pptxPOINT- BIOCHEMISTRY SEM 2 ENZYMES UNIT 5.pptx
POINT- BIOCHEMISTRY SEM 2 ENZYMES UNIT 5.pptxSayali Powar
 
Historical philosophical, theoretical, and legal foundations of special and i...
Historical philosophical, theoretical, and legal foundations of special and i...Historical philosophical, theoretical, and legal foundations of special and i...
Historical philosophical, theoretical, and legal foundations of special and i...jaredbarbolino94
 
How to Configure Email Server in Odoo 17
How to Configure Email Server in Odoo 17How to Configure Email Server in Odoo 17
How to Configure Email Server in Odoo 17Celine George
 
“Oh GOSH! Reflecting on Hackteria's Collaborative Practices in a Global Do-It...
“Oh GOSH! Reflecting on Hackteria's Collaborative Practices in a Global Do-It...“Oh GOSH! Reflecting on Hackteria's Collaborative Practices in a Global Do-It...
“Oh GOSH! Reflecting on Hackteria's Collaborative Practices in a Global Do-It...Marc Dusseiller Dusjagr
 
Employee wellbeing at the workplace.pptx
Employee wellbeing at the workplace.pptxEmployee wellbeing at the workplace.pptx
Employee wellbeing at the workplace.pptxNirmalaLoungPoorunde1
 
Alper Gobel In Media Res Media Component
Alper Gobel In Media Res Media ComponentAlper Gobel In Media Res Media Component
Alper Gobel In Media Res Media ComponentInMediaRes1
 
Gas measurement O2,Co2,& ph) 04/2024.pptx
Gas measurement O2,Co2,& ph) 04/2024.pptxGas measurement O2,Co2,& ph) 04/2024.pptx
Gas measurement O2,Co2,& ph) 04/2024.pptxDr.Ibrahim Hassaan
 
What is Model Inheritance in Odoo 17 ERP
What is Model Inheritance in Odoo 17 ERPWhat is Model Inheritance in Odoo 17 ERP
What is Model Inheritance in Odoo 17 ERPCeline George
 

Recently uploaded (20)

Solving Puzzles Benefits Everyone (English).pptx
Solving Puzzles Benefits Everyone (English).pptxSolving Puzzles Benefits Everyone (English).pptx
Solving Puzzles Benefits Everyone (English).pptx
 
Framing an Appropriate Research Question 6b9b26d93da94caf993c038d9efcdedb.pdf
Framing an Appropriate Research Question 6b9b26d93da94caf993c038d9efcdedb.pdfFraming an Appropriate Research Question 6b9b26d93da94caf993c038d9efcdedb.pdf
Framing an Appropriate Research Question 6b9b26d93da94caf993c038d9efcdedb.pdf
 
OS-operating systems- ch04 (Threads) ...
OS-operating systems- ch04 (Threads) ...OS-operating systems- ch04 (Threads) ...
OS-operating systems- ch04 (Threads) ...
 
call girls in Kamla Market (DELHI) 🔝 >༒9953330565🔝 genuine Escort Service 🔝✔️✔️
call girls in Kamla Market (DELHI) 🔝 >༒9953330565🔝 genuine Escort Service 🔝✔️✔️call girls in Kamla Market (DELHI) 🔝 >༒9953330565🔝 genuine Escort Service 🔝✔️✔️
call girls in Kamla Market (DELHI) 🔝 >༒9953330565🔝 genuine Escort Service 🔝✔️✔️
 
EPANDING THE CONTENT OF AN OUTLINE using notes.pptx
EPANDING THE CONTENT OF AN OUTLINE using notes.pptxEPANDING THE CONTENT OF AN OUTLINE using notes.pptx
EPANDING THE CONTENT OF AN OUTLINE using notes.pptx
 
Painted Grey Ware.pptx, PGW Culture of India
Painted Grey Ware.pptx, PGW Culture of IndiaPainted Grey Ware.pptx, PGW Culture of India
Painted Grey Ware.pptx, PGW Culture of India
 
CELL CYCLE Division Science 8 quarter IV.pptx
CELL CYCLE Division Science 8 quarter IV.pptxCELL CYCLE Division Science 8 quarter IV.pptx
CELL CYCLE Division Science 8 quarter IV.pptx
 
Model Call Girl in Bikash Puri Delhi reach out to us at 🔝9953056974🔝
Model Call Girl in Bikash Puri  Delhi reach out to us at 🔝9953056974🔝Model Call Girl in Bikash Puri  Delhi reach out to us at 🔝9953056974🔝
Model Call Girl in Bikash Puri Delhi reach out to us at 🔝9953056974🔝
 
Proudly South Africa powerpoint Thorisha.pptx
Proudly South Africa powerpoint Thorisha.pptxProudly South Africa powerpoint Thorisha.pptx
Proudly South Africa powerpoint Thorisha.pptx
 
Model Call Girl in Tilak Nagar Delhi reach out to us at 🔝9953056974🔝
Model Call Girl in Tilak Nagar Delhi reach out to us at 🔝9953056974🔝Model Call Girl in Tilak Nagar Delhi reach out to us at 🔝9953056974🔝
Model Call Girl in Tilak Nagar Delhi reach out to us at 🔝9953056974🔝
 
Introduction to AI in Higher Education_draft.pptx
Introduction to AI in Higher Education_draft.pptxIntroduction to AI in Higher Education_draft.pptx
Introduction to AI in Higher Education_draft.pptx
 
9953330565 Low Rate Call Girls In Rohini Delhi NCR
9953330565 Low Rate Call Girls In Rohini  Delhi NCR9953330565 Low Rate Call Girls In Rohini  Delhi NCR
9953330565 Low Rate Call Girls In Rohini Delhi NCR
 
POINT- BIOCHEMISTRY SEM 2 ENZYMES UNIT 5.pptx
POINT- BIOCHEMISTRY SEM 2 ENZYMES UNIT 5.pptxPOINT- BIOCHEMISTRY SEM 2 ENZYMES UNIT 5.pptx
POINT- BIOCHEMISTRY SEM 2 ENZYMES UNIT 5.pptx
 
Historical philosophical, theoretical, and legal foundations of special and i...
Historical philosophical, theoretical, and legal foundations of special and i...Historical philosophical, theoretical, and legal foundations of special and i...
Historical philosophical, theoretical, and legal foundations of special and i...
 
How to Configure Email Server in Odoo 17
How to Configure Email Server in Odoo 17How to Configure Email Server in Odoo 17
How to Configure Email Server in Odoo 17
 
“Oh GOSH! Reflecting on Hackteria's Collaborative Practices in a Global Do-It...
“Oh GOSH! Reflecting on Hackteria's Collaborative Practices in a Global Do-It...“Oh GOSH! Reflecting on Hackteria's Collaborative Practices in a Global Do-It...
“Oh GOSH! Reflecting on Hackteria's Collaborative Practices in a Global Do-It...
 
Employee wellbeing at the workplace.pptx
Employee wellbeing at the workplace.pptxEmployee wellbeing at the workplace.pptx
Employee wellbeing at the workplace.pptx
 
Alper Gobel In Media Res Media Component
Alper Gobel In Media Res Media ComponentAlper Gobel In Media Res Media Component
Alper Gobel In Media Res Media Component
 
Gas measurement O2,Co2,& ph) 04/2024.pptx
Gas measurement O2,Co2,& ph) 04/2024.pptxGas measurement O2,Co2,& ph) 04/2024.pptx
Gas measurement O2,Co2,& ph) 04/2024.pptx
 
What is Model Inheritance in Odoo 17 ERP
What is Model Inheritance in Odoo 17 ERPWhat is Model Inheritance in Odoo 17 ERP
What is Model Inheritance in Odoo 17 ERP
 

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