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

PPT
Git Introduction
PPTX
Git Presentation
PPTX
Introduction to Git and Github
PPTX
Github basics
PPTX
Introduction git
PPTX
Git One Day Training Notes
PDF
Git Tutorial I
PPTX
Github
Git Introduction
Git Presentation
Introduction to Git and Github
Github basics
Introduction git
Git One Day Training Notes
Git Tutorial I
Github

What's hot (20)

PDF
Github - Git Training Slides: Foundations
PDF
Git Version Control System
PDF
Introduction to git
PPTX
GitHub Presentation
PPT
Git101
PDF
Git & GitHub for Beginners
PPTX
Git tutorial
KEY
The everyday developer's guide to version control with Git
PDF
git and github
PDF
Intro to Git and GitHub
PPTX
GitFlow, SourceTree and GitLab
PDF
Git basics
PPTX
GitHub Basics - Derek Bable
PDF
GIT | Distributed Version Control System
PPTX
Git - Basic Crash Course
PDF
Git - An Introduction
PPTX
Introduction to git administration
KEY
Introduction to Git
PPT
Git training
PPTX
Git tutorial
Github - Git Training Slides: Foundations
Git Version Control System
Introduction to git
GitHub Presentation
Git101
Git & GitHub for Beginners
Git tutorial
The everyday developer's guide to version control with Git
git and github
Intro to Git and GitHub
GitFlow, SourceTree and GitLab
Git basics
GitHub Basics - Derek Bable
GIT | Distributed Version Control System
Git - Basic Crash Course
Git - An Introduction
Introduction to git administration
Introduction to Git
Git training
Git tutorial
Ad

Similar to Git Tutorial (20)

PDF
Git & version control crash course
PPT
Git installation and configuration
PDF
Mini git tutorial
PPT
Git and fundamentals
PPTX
Git workshop 33degree 2011 krakow
PPTX
github ppt git ppt on git hub to know ab
PPTX
git.ppt.pptx power point presentation got Google internet
PPTX
Git Basics for Software Version Management
PPTX
01 - Git vs SVN
PDF
PDF
Git in a nutshell
PPTX
Hello git - a soft introduction to git (Talk Slides)
PPTX
sample.pptx
PPTX
Lets Git Together
PDF
Collaborative development with Git | Workshop
PPTX
Getting Git...before it gets you
PDF
Hello git
KEY
Let's Git this Party Started: An Introduction to Git and GitHub
PPTX
Bitbucket as a code server and pmt
PDF
GIT_GITHUB_2016_06_17
Git & version control crash course
Git installation and configuration
Mini git tutorial
Git and fundamentals
Git workshop 33degree 2011 krakow
github ppt git ppt on git hub to know ab
git.ppt.pptx power point presentation got Google internet
Git Basics for Software Version Management
01 - Git vs SVN
Git in a nutshell
Hello git - a soft introduction to git (Talk Slides)
sample.pptx
Lets Git Together
Collaborative development with Git | Workshop
Getting Git...before it gets you
Hello git
Let's Git this Party Started: An Introduction to Git and GitHub
Bitbucket as a code server and pmt
GIT_GITHUB_2016_06_17
Ad

Recently uploaded (20)

PDF
How to Migrate SBCGlobal Email to Yahoo Easily
PDF
Navsoft: AI-Powered Business Solutions & Custom Software Development
PPTX
Transform Your Business with a Software ERP System
PPTX
Agentic AI Use Case- Contract Lifecycle Management (CLM).pptx
PDF
Why TechBuilder is the Future of Pickup and Delivery App Development (1).pdf
PPTX
history of c programming in notes for students .pptx
PPTX
Agentic AI : A Practical Guide. Undersating, Implementing and Scaling Autono...
PDF
System and Network Administration Chapter 2
PPTX
ISO 45001 Occupational Health and Safety Management System
PDF
Odoo Companies in India – Driving Business Transformation.pdf
PDF
Flood Susceptibility Mapping Using Image-Based 2D-CNN Deep Learnin. Overview ...
PDF
System and Network Administraation Chapter 3
PPTX
Lecture 3: Operating Systems Introduction to Computer Hardware Systems
PDF
Design an Analysis of Algorithms I-SECS-1021-03
PDF
Softaken Excel to vCard Converter Software.pdf
PPTX
ai tools demonstartion for schools and inter college
PDF
Claude Code: Everyone is a 10x Developer - A Comprehensive AI-Powered CLI Tool
PDF
How Creative Agencies Leverage Project Management Software.pdf
PDF
Digital Strategies for Manufacturing Companies
PDF
Nekopoi APK 2025 free lastest update
How to Migrate SBCGlobal Email to Yahoo Easily
Navsoft: AI-Powered Business Solutions & Custom Software Development
Transform Your Business with a Software ERP System
Agentic AI Use Case- Contract Lifecycle Management (CLM).pptx
Why TechBuilder is the Future of Pickup and Delivery App Development (1).pdf
history of c programming in notes for students .pptx
Agentic AI : A Practical Guide. Undersating, Implementing and Scaling Autono...
System and Network Administration Chapter 2
ISO 45001 Occupational Health and Safety Management System
Odoo Companies in India – Driving Business Transformation.pdf
Flood Susceptibility Mapping Using Image-Based 2D-CNN Deep Learnin. Overview ...
System and Network Administraation Chapter 3
Lecture 3: Operating Systems Introduction to Computer Hardware Systems
Design an Analysis of Algorithms I-SECS-1021-03
Softaken Excel to vCard Converter Software.pdf
ai tools demonstartion for schools and inter college
Claude Code: Everyone is a 10x Developer - A Comprehensive AI-Powered CLI Tool
How Creative Agencies Leverage Project Management Software.pdf
Digital Strategies for Manufacturing Companies
Nekopoi APK 2025 free lastest update

Git Tutorial

  • 1. Pranav Kulkarni Theoretical Neuroscience Lab, IISER Pune pranavcode@gmail.com 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