SlideShare a Scribd company logo
Pranav Kulkarni
Theoretical Neuroscience Lab, IISER Pune
pranavcode@gmail.com
Tutorial
1. Introduction
2. Installation
3. Configuration & First repo
4. File Status Lifecycle
5. Staging
6. Undo
7. Log
8. Remote
9. Branching
10. Tagging
Everything Git!
1. Introduction
● Applications
– Backups, Collaboration, Organization
● Benefits
– Speed
– Simple design
– Parallel branches
– Fully distributed
● Example project using Git.
● Found at – git-scm.com
2. Installation
● Linux
# apt-get install git
# yum install git
● Mac
# brew install git
● Windows
– Installer from git-scm.com
3. Configuration & First repo
$ git config --global user.name “Name”
$ git config --global user.email “e-mail-id”
$ git config --global core.editor “emacs -nw”
$ git config --global color.ui true
$ git config --global credential.helper cache
$ git init first-repo
$ git clone repo-remote-url
4. Staging
$ git status
$ echo “First file.” > README
$ git diff
$ git add README
$ git rm README
$ git diff –cached
$ git commit -m “commit message”
5. File Status Lifecycle
Image Source: http://git-scm.com/book/en/v2/book/02-git-basics/images/lifecycle.png
6. Undo
$ git commit --amend
$ git reset HEAD
$ git reset HEAD file
$ git checkout file
7. Log
$ git log
$ git log --author='name'
--pretty=oneline
--graph
--oneline
--decorate
--all
$ git show
8. Remote
$ git remote add origin
$ git push -u origin master
$ git pull origin master
$ git fetch
$ git merge
9. Branching
$ git branch -b branch-name
$ git checkout branch
$ git checkout -b branch-name
$ git push origin branch-name
$ git branch -d branch-name
$ git push origin --delete branch-name
10. Tagging
$ git tag -a tag-name -m “message”
$ git push --tags
$ git show tag-name
$ git checkout tag-name
$ git tag -d tag-name
$ git push origin :refs/tags/tag-name
Thank you!

More Related Content

What's hot (20)

PDF
Github - Git Training Slides: Foundations
Lee Hanxue
 
PDF
Git Version Control System
KMS Technology
 
PDF
Introduction to git
Randal Schwartz
 
PPTX
GitHub Presentation
BrianSchilder
 
PPT
Git101
Jason Noble
 
PDF
Git & GitHub for Beginners
Sébastien Saunier
 
PPTX
Git tutorial
Pham Quy (Jack)
 
KEY
The everyday developer's guide to version control with Git
E Carter
 
PDF
git and github
Darren Oakley
 
PDF
Intro to Git and GitHub
Panagiotis Papadopoulos
 
PPTX
GitFlow, SourceTree and GitLab
Shinu Suresh
 
PDF
Git basics
GHARSALLAH Mohamed
 
PPTX
GitHub Basics - Derek Bable
"FENG "GEORGE"" YU
 
PDF
GIT | Distributed Version Control System
Mohammad Imam Hossain
 
PPTX
Git - Basic Crash Course
Nilay Binjola
 
PDF
Git - An Introduction
Behzad Altaf
 
PPTX
Introduction to git administration
Shawn Doyle
 
KEY
Introduction to Git
Lukas Fittl
 
PPT
Git training
adm_exoplatform
 
PPTX
Git tutorial
TingYen Lee
 
Github - Git Training Slides: Foundations
Lee Hanxue
 
Git Version Control System
KMS Technology
 
Introduction to git
Randal Schwartz
 
GitHub Presentation
BrianSchilder
 
Git101
Jason Noble
 
Git & GitHub for Beginners
Sébastien Saunier
 
Git tutorial
Pham Quy (Jack)
 
The everyday developer's guide to version control with Git
E Carter
 
git and github
Darren Oakley
 
Intro to Git and GitHub
Panagiotis Papadopoulos
 
GitFlow, SourceTree and GitLab
Shinu Suresh
 
Git basics
GHARSALLAH Mohamed
 
GitHub Basics - Derek Bable
"FENG "GEORGE"" YU
 
GIT | Distributed Version Control System
Mohammad Imam Hossain
 
Git - Basic Crash Course
Nilay Binjola
 
Git - An Introduction
Behzad Altaf
 
Introduction to git administration
Shawn Doyle
 
Introduction to Git
Lukas Fittl
 
Git training
adm_exoplatform
 
Git tutorial
TingYen Lee
 

Similar to Git Tutorial (20)

PDF
Git & version control crash course
Eslam Saeed
 
PPT
Git installation and configuration
Kishor Kumar
 
PDF
Mini git tutorial
Cristian Lucchesi
 
PPT
Git and fundamentals
Naincy Gupta
 
PPTX
Git workshop 33degree 2011 krakow
Luca Milanesio
 
PPTX
github ppt git ppt on git hub to know ab
infoinnext
 
PPTX
git.ppt.pptx power point presentation got Google internet
rani marri
 
PPTX
Git Basics for Software Version Management
ishanmittal49
 
PPTX
01 - Git vs SVN
Edward Goikhman
 
PDF
git.ppt.pdf
Roniel Lopez Alvarez
 
PDF
Git in a nutshell
Pranesh Vittal
 
PPTX
Hello git - a soft introduction to git (Talk Slides)
Amity University Noida
 
PPTX
sample.pptx
UshaSuray
 
PPTX
Lets Git Together
Rakesh Jha
 
PDF
Collaborative development with Git | Workshop
Anuchit Chalothorn
 
PPTX
Getting Git...before it gets you
Jeremy Brown
 
PDF
Hello git
Josh Dvir
 
KEY
Let's Git this Party Started: An Introduction to Git and GitHub
Kim Moir
 
PPTX
Bitbucket as a code server and pmt
malike4u
 
PDF
GIT_GITHUB_2016_06_17
siva ram
 
Git & version control crash course
Eslam Saeed
 
Git installation and configuration
Kishor Kumar
 
Mini git tutorial
Cristian Lucchesi
 
Git and fundamentals
Naincy Gupta
 
Git workshop 33degree 2011 krakow
Luca Milanesio
 
github ppt git ppt on git hub to know ab
infoinnext
 
git.ppt.pptx power point presentation got Google internet
rani marri
 
Git Basics for Software Version Management
ishanmittal49
 
01 - Git vs SVN
Edward Goikhman
 
Git in a nutshell
Pranesh Vittal
 
Hello git - a soft introduction to git (Talk Slides)
Amity University Noida
 
sample.pptx
UshaSuray
 
Lets Git Together
Rakesh Jha
 
Collaborative development with Git | Workshop
Anuchit Chalothorn
 
Getting Git...before it gets you
Jeremy Brown
 
Hello git
Josh Dvir
 
Let's Git this Party Started: An Introduction to Git and GitHub
Kim Moir
 
Bitbucket as a code server and pmt
malike4u
 
GIT_GITHUB_2016_06_17
siva ram
 
Ad

Recently uploaded (20)

PDF
MiniTool Partition Wizard Free Crack + Full Free Download 2025
bashirkhan333g
 
PDF
Digger Solo: Semantic search and maps for your local files
seanpedersen96
 
PDF
Open Chain Q2 Steering Committee Meeting - 2025-06-25
Shane Coughlan
 
PPTX
Homogeneity of Variance Test Options IBM SPSS Statistics Version 31.pptx
Version 1 Analytics
 
PDF
iTop VPN With Crack Lifetime Activation Key-CODE
utfefguu
 
PDF
IDM Crack with Internet Download Manager 6.42 Build 43 with Patch Latest 2025
bashirkhan333g
 
PDF
SAP Firmaya İade ABAB Kodları - ABAB ile yazılmıl hazır kod örneği
Salih Küçük
 
PDF
[Solution] Why Choose the VeryPDF DRM Protector Custom-Built Solution for You...
Lingwen1998
 
PPTX
Home Care Tools: Benefits, features and more
Third Rock Techkno
 
PDF
Driver Easy Pro 6.1.1 Crack Licensce key 2025 FREE
utfefguu
 
PDF
유니티에서 Burst Compiler+ThreadedJobs+SIMD 적용사례
Seongdae Kim
 
PDF
SciPy 2025 - Packaging a Scientific Python Project
Henry Schreiner
 
PDF
Unlock Efficiency with Insurance Policy Administration Systems
Insurance Tech Services
 
PDF
The 5 Reasons for IT Maintenance - Arna Softech
Arna Softech
 
PDF
How to Hire AI Developers_ Step-by-Step Guide in 2025.pdf
DianApps Technologies
 
PDF
HiHelloHR – Simplify HR Operations for Modern Workplaces
HiHelloHR
 
PDF
4K Video Downloader Plus Pro Crack for MacOS New Download 2025
bashirkhan333g
 
PPTX
OpenChain @ OSS NA - In From the Cold: Open Source as Part of Mainstream Soft...
Shane Coughlan
 
PDF
TheFutureIsDynamic-BoxLang witch Luis Majano.pdf
Ortus Solutions, Corp
 
PDF
Automate Cybersecurity Tasks with Python
VICTOR MAESTRE RAMIREZ
 
MiniTool Partition Wizard Free Crack + Full Free Download 2025
bashirkhan333g
 
Digger Solo: Semantic search and maps for your local files
seanpedersen96
 
Open Chain Q2 Steering Committee Meeting - 2025-06-25
Shane Coughlan
 
Homogeneity of Variance Test Options IBM SPSS Statistics Version 31.pptx
Version 1 Analytics
 
iTop VPN With Crack Lifetime Activation Key-CODE
utfefguu
 
IDM Crack with Internet Download Manager 6.42 Build 43 with Patch Latest 2025
bashirkhan333g
 
SAP Firmaya İade ABAB Kodları - ABAB ile yazılmıl hazır kod örneği
Salih Küçük
 
[Solution] Why Choose the VeryPDF DRM Protector Custom-Built Solution for You...
Lingwen1998
 
Home Care Tools: Benefits, features and more
Third Rock Techkno
 
Driver Easy Pro 6.1.1 Crack Licensce key 2025 FREE
utfefguu
 
유니티에서 Burst Compiler+ThreadedJobs+SIMD 적용사례
Seongdae Kim
 
SciPy 2025 - Packaging a Scientific Python Project
Henry Schreiner
 
Unlock Efficiency with Insurance Policy Administration Systems
Insurance Tech Services
 
The 5 Reasons for IT Maintenance - Arna Softech
Arna Softech
 
How to Hire AI Developers_ Step-by-Step Guide in 2025.pdf
DianApps Technologies
 
HiHelloHR – Simplify HR Operations for Modern Workplaces
HiHelloHR
 
4K Video Downloader Plus Pro Crack for MacOS New Download 2025
bashirkhan333g
 
OpenChain @ OSS NA - In From the Cold: Open Source as Part of Mainstream Soft...
Shane Coughlan
 
TheFutureIsDynamic-BoxLang witch Luis Majano.pdf
Ortus Solutions, Corp
 
Automate Cybersecurity Tasks with Python
VICTOR MAESTRE RAMIREZ
 
Ad

Git Tutorial

  • 2. 1. Introduction 2. Installation 3. Configuration & First repo 4. File Status Lifecycle 5. Staging 6. Undo 7. Log 8. Remote 9. Branching 10. Tagging Everything Git!
  • 3. 1. Introduction ● Applications – Backups, Collaboration, Organization ● Benefits – Speed – Simple design – Parallel branches – Fully distributed ● Example project using Git. ● Found at – git-scm.com
  • 4. 2. Installation ● Linux # apt-get install git # yum install git ● Mac # brew install git ● Windows – Installer from git-scm.com
  • 5. 3. Configuration & First repo $ git config --global user.name “Name” $ git config --global user.email “e-mail-id” $ git config --global core.editor “emacs -nw” $ git config --global color.ui true $ git config --global credential.helper cache $ git init first-repo $ git clone repo-remote-url
  • 6. 4. Staging $ git status $ echo “First file.” > README $ git diff $ git add README $ git rm README $ git diff –cached $ git commit -m “commit message”
  • 7. 5. File Status Lifecycle Image Source: http://git-scm.com/book/en/v2/book/02-git-basics/images/lifecycle.png
  • 8. 6. Undo $ git commit --amend $ git reset HEAD $ git reset HEAD file $ git checkout file
  • 9. 7. Log $ git log $ git log --author='name' --pretty=oneline --graph --oneline --decorate --all $ git show
  • 10. 8. Remote $ git remote add origin $ git push -u origin master $ git pull origin master $ git fetch $ git merge
  • 11. 9. Branching $ git branch -b branch-name $ git checkout branch $ git checkout -b branch-name $ git push origin branch-name $ git branch -d branch-name $ git push origin --delete branch-name
  • 12. 10. Tagging $ git tag -a tag-name -m “message” $ git push --tags $ git show tag-name $ git checkout tag-name $ git tag -d tag-name $ git push origin :refs/tags/tag-name