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
Linux Certificate of Completion - LabEx Certificate
VICTOR MAESTRE RAMIREZ
 
PPTX
Engineering the Java Web Application (MVC)
abhishekoza1981
 
PDF
Executive Business Intelligence Dashboards
vandeslie24
 
PDF
Efficient, Automated Claims Processing Software for Insurers
Insurance Tech Services
 
PPTX
MiniTool Power Data Recovery Full Crack Latest 2025
muhammadgurbazkhan
 
PDF
Capcut Pro Crack For PC Latest Version {Fully Unlocked} 2025
hashhshs786
 
PPTX
Human Resources Information System (HRIS)
Amity University, Patna
 
PDF
Alexander Marshalov - How to use AI Assistants with your Monitoring system Q2...
VictoriaMetrics
 
PDF
Automate Cybersecurity Tasks with Python
VICTOR MAESTRE RAMIREZ
 
PPT
MergeSortfbsjbjsfk sdfik k
RafishaikIT02044
 
PPTX
3uTools Full Crack Free Version Download [Latest] 2025
muhammadgurbazkhan
 
PDF
Revenue streams of the Wazirx clone script.pdf
aaronjeffray
 
PDF
Build It, Buy It, or Already Got It? Make Smarter Martech Decisions
bbedford2
 
PDF
GetOnCRM Speeds Up Agentforce 3 Deployment for Enterprise AI Wins.pdf
GetOnCRM Solutions
 
PDF
Alarm in Android-Scheduling Timed Tasks Using AlarmManager in Android.pdf
Nabin Dhakal
 
PDF
Streamline Contractor Lifecycle- TECH EHS Solution
TECH EHS Solution
 
PPTX
The Role of a PHP Development Company in Modern Web Development
SEO Company for School in Delhi NCR
 
PPTX
Revolutionizing Code Modernization with AI
KrzysztofKkol1
 
PDF
Digger Solo: Semantic search and maps for your local files
seanpedersen96
 
PPTX
Migrating Millions of Users with Debezium, Apache Kafka, and an Acyclic Synch...
MD Sayem Ahmed
 
Linux Certificate of Completion - LabEx Certificate
VICTOR MAESTRE RAMIREZ
 
Engineering the Java Web Application (MVC)
abhishekoza1981
 
Executive Business Intelligence Dashboards
vandeslie24
 
Efficient, Automated Claims Processing Software for Insurers
Insurance Tech Services
 
MiniTool Power Data Recovery Full Crack Latest 2025
muhammadgurbazkhan
 
Capcut Pro Crack For PC Latest Version {Fully Unlocked} 2025
hashhshs786
 
Human Resources Information System (HRIS)
Amity University, Patna
 
Alexander Marshalov - How to use AI Assistants with your Monitoring system Q2...
VictoriaMetrics
 
Automate Cybersecurity Tasks with Python
VICTOR MAESTRE RAMIREZ
 
MergeSortfbsjbjsfk sdfik k
RafishaikIT02044
 
3uTools Full Crack Free Version Download [Latest] 2025
muhammadgurbazkhan
 
Revenue streams of the Wazirx clone script.pdf
aaronjeffray
 
Build It, Buy It, or Already Got It? Make Smarter Martech Decisions
bbedford2
 
GetOnCRM Speeds Up Agentforce 3 Deployment for Enterprise AI Wins.pdf
GetOnCRM Solutions
 
Alarm in Android-Scheduling Timed Tasks Using AlarmManager in Android.pdf
Nabin Dhakal
 
Streamline Contractor Lifecycle- TECH EHS Solution
TECH EHS Solution
 
The Role of a PHP Development Company in Modern Web Development
SEO Company for School in Delhi NCR
 
Revolutionizing Code Modernization with AI
KrzysztofKkol1
 
Digger Solo: Semantic search and maps for your local files
seanpedersen96
 
Migrating Millions of Users with Debezium, Apache Kafka, and an Acyclic Synch...
MD Sayem Ahmed
 
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