SlideShare a Scribd company logo
Basics of GIT
Ashwin Date
Durgesh Sonawane
DO GIT like a BOSS !!
Fear
कडून
confidence
कडे
Why GIT ?
Ashwin
edited
my files !!
Github/Gitlab - Ab Bitbucket kidhar se aya ?
- Github and Bitbucket are cloud based repository
hosting services. Similar to web servers, GIT servers
store your repository and allow SSH & HTTP
connection
- Gitlab is a self hosted service. We’re hosting it on
Amazon
- A “REMOTE” GIT repository can live anywhere -
Remember it used to be on our old 192.168.1.200
server ?
GIT is *Distributed* Version Control
- Durgesh’s Local Copy (Durgesh’s
Clone)
- Sachin’s Local Copy (Sachin’s
Clone)
- Nidhi’s Local Copy (Nidhi’s
Clone)
- GIT Server (Remote)
- No Need to be online to
“COMMIT”
Remote pe Charcha
- Any GIT server can be added as
a “REMOTE”
- You may add multiple
“REMOTE”s to your local
repository
- You “COMMIT” changes to a
local clone and “PUSH” changes
to a remote
Making a Fork
- Fork is a copy of someone else’s
repository created under your
own account
- You “PUSH” to your own fork
and then ask the original
repository owner to merge your
changes
TIP : Your fork needs to be updated
by pushing the changes from the
original repo, it won’t update itself :)
Clone and get going!
- Cloning will create a “CLONE” of your
remote GIT repository on your computer
- The remote GIT repository is auto
configured with the name “ORIGIN”
- You can then add additional REMOTEs
with other names
- If your repository is a fork, then add a new
remote named “UPSTREAM” pointing to
the original repo that you forked from
- git clone git@github.com/joomla/joomla-
Getting started with development
- Once you clone start making changes to your files
- git add <file path>
- git rm <file path>
- This adds your new and changed files to the list of files that will be committed
- You haven’t committed yet
- Deleted files *also* need to be committed
- You haven’t committed yet
- This adds your changes to the list of files that will be committed
तुका म्हणे
|| commit म्हणजे push नव्हे ||
- git push origin master
- This will push your files to
the remote GIT repo
named origin (your fork)
Getting other people’s changes
- You’re not the only one making commits
and pushing
- Remember Sachin and Nidhi also cloned
- They also saw this and pushed
- To get their changes
- git pull origin master
- What if they changed the
same files that I worked on
तुका म्हणे
|| conflict ला भिऊ नकोस ||
|| file बघून करशील merge ||
Merge conflicts will happen when
you edit the same piece of code in
the same file that someone else has
worked on
You simply need to open the file
and manually merge the conflicts
MERGE CONFLICTS are normal
When you have leftover, uncommitted work
तुका म्हणे
|| conflict ला भिऊ नकोस ||
|| file बघून करशील merge ||
Merge conflicts will happen when
you edit the same piece of code in
the same file that someone else has
worked on
You simply need to open the file
and manually merge the conflicts
Tagging in GIT
- Tags are used to “Tag” releases so that the state of files against that tag get
locked, and can be referred in the future
- git tag v5.0
- git push --tags
- git pull --tags
GIT Gotchas
- git config core.fileMode false
Ignores chmod changes from being tracked in GIT
- Use the .gitignore file
This will stop images, backups from being committed and pushed
- Undo git add
git reset <file path>
- Reverting all changes to a file to the the latest commit
- git checkout <file path>
GIT Best Practices
- git pull
- Pull other people’s changes frequently to stay updated
- No temporary work on master
Use branches to work on temporary stuff, don’t pollute your master branch
Working with Multiple REMOTEs
- Useful when you are working on your own “FORK”
- git remote add upstream <git repo URL>
- upstream is the name of the remote server
- You can name it anything you want :)
- git push upstream master
- Pushes your changes to the upstream remote GIT server
Any Questions ???

More Related Content

What's hot

Demo
DemoDemo
Intro to Git and GitHub
Intro to Git and GitHubIntro to Git and GitHub
Intro to Git and GitHub
Uri Goldstein
 
Git Introduction
Git IntroductionGit Introduction
Git Introduction
Anil Wadghule
 
Git basic
Git basicGit basic
Git basic
Emran Ul Hadi
 
Git tutorial
Git tutorial Git tutorial
Git tutorial
TingYen Lee
 
Introduction to Git
Introduction to GitIntroduction to Git
Introduction to Git
Yan Vugenfirer
 
Introduction to Git
Introduction to GitIntroduction to Git
Introduction to Git
Lukas Fittl
 
Git in 10 minutes
Git in 10 minutesGit in 10 minutes
Git in 10 minutes
Safique Ahmed Faruque
 
Introduction to Git
Introduction to GitIntroduction to Git
Introduction to Git
Colin Su
 
Introduction to git
Introduction to gitIntroduction to git
Introduction to git
Shilu Shrestha
 
Git Tutorial
Git TutorialGit Tutorial
Git Tutorial
Pranav Kulkarni
 
Git for beginners
Git for beginnersGit for beginners
Git for beginners
Arulmurugan Rajaraman
 
Git and Github Session
Git and Github SessionGit and Github Session
Git and Github Session
GoogleDevelopersStud1
 
Git tutorial II
Git tutorial IIGit tutorial II
Git tutorial II
Jim Yeh
 
Git Version Control System
Git Version Control SystemGit Version Control System
Git Version Control System
KMS Technology
 
Git introduction workshop for scientists
Git introduction workshop for scientists Git introduction workshop for scientists
Git introduction workshop for scientists
Steven Hamblin
 
Git - The Incomplete Introduction
Git - The Incomplete IntroductionGit - The Incomplete Introduction
Git - The Incomplete Introduction
rschwietzke
 
Git 101
Git 101Git 101
Git 101
jayrparro
 
Introduction to GitHub
Introduction to GitHubIntroduction to GitHub
Introduction to GitHub
Nishan Bose
 
Git and github fundamentals
Git and github fundamentalsGit and github fundamentals
Git and github fundamentals
RajKharvar
 

What's hot (20)

Demo
DemoDemo
Demo
 
Intro to Git and GitHub
Intro to Git and GitHubIntro to Git and GitHub
Intro to Git and GitHub
 
Git Introduction
Git IntroductionGit Introduction
Git Introduction
 
Git basic
Git basicGit basic
Git basic
 
Git tutorial
Git tutorial Git tutorial
Git tutorial
 
Introduction to Git
Introduction to GitIntroduction to Git
Introduction to Git
 
Introduction to Git
Introduction to GitIntroduction to Git
Introduction to Git
 
Git in 10 minutes
Git in 10 minutesGit in 10 minutes
Git in 10 minutes
 
Introduction to Git
Introduction to GitIntroduction to Git
Introduction to Git
 
Introduction to git
Introduction to gitIntroduction to git
Introduction to git
 
Git Tutorial
Git TutorialGit Tutorial
Git Tutorial
 
Git for beginners
Git for beginnersGit for beginners
Git for beginners
 
Git and Github Session
Git and Github SessionGit and Github Session
Git and Github Session
 
Git tutorial II
Git tutorial IIGit tutorial II
Git tutorial II
 
Git Version Control System
Git Version Control SystemGit Version Control System
Git Version Control System
 
Git introduction workshop for scientists
Git introduction workshop for scientists Git introduction workshop for scientists
Git introduction workshop for scientists
 
Git - The Incomplete Introduction
Git - The Incomplete IntroductionGit - The Incomplete Introduction
Git - The Incomplete Introduction
 
Git 101
Git 101Git 101
Git 101
 
Introduction to GitHub
Introduction to GitHubIntroduction to GitHub
Introduction to GitHub
 
Git and github fundamentals
Git and github fundamentalsGit and github fundamentals
Git and github fundamentals
 

Similar to Git basics

The Fundamentals of Git
The Fundamentals of GitThe Fundamentals of Git
The Fundamentals of Git
DivineOmega
 
Introduction to git and githhub with practicals.pptx
Introduction to git and githhub with practicals.pptxIntroduction to git and githhub with practicals.pptx
Introduction to git and githhub with practicals.pptx
Abdul Salam
 
Advanced Git Tutorial
Advanced Git TutorialAdvanced Git Tutorial
Advanced Git Tutorial
Sage Sharp
 
Git introduction
Git introductionGit introduction
Git introduction
satyendrajaladi
 
Git and github introduction
Git and github introductionGit and github introduction
Git and github introduction
John(Qiang) Zhang
 
GIT from n00b
GIT from n00bGIT from n00b
GIT from n00b
Supachai Vorrasing
 
Git & Github
Git & GithubGit & Github
Git & Github
Aman Lalpuria
 
Advanted git
Advanted git Advanted git
Advanted git
Sahil Gupta
 
git2.ppt
git2.pptgit2.ppt
Git Commands Every Developer Should Know?
Git Commands Every Developer Should Know?Git Commands Every Developer Should Know?
Git Commands Every Developer Should Know?
9 series
 
Github By Nyros Developer
Github By Nyros DeveloperGithub By Nyros Developer
Github By Nyros Developer
Nyros Technologies
 
Git, Beginner to Advanced Survey
Git, Beginner to Advanced SurveyGit, Beginner to Advanced Survey
Git, Beginner to Advanced Survey
Rafal Rusin
 
Git and Github
Git and GithubGit and Github
Git and Github
Teodora Ahkozidou
 
Git for standalone use
Git for standalone useGit for standalone use
Git for standalone use
Ikuru Kanuma
 
Learn Git Basics
Learn Git BasicsLearn Git Basics
Learn Git Basics
Prakash Dantuluri
 
Git github
Git githubGit github
Git github
Anurag Deb
 
Git basic and workflow
Git basic and workflowGit basic and workflow
Git basic and workflow
buikhanhbk
 
Git presentation to some coworkers some time ago
Git presentation to some coworkers some time agoGit presentation to some coworkers some time ago
Git presentation to some coworkers some time ago
Rodrigo Urubatan
 
Git and github
Git and githubGit and github
Git and github
Teodora Ahkozidou
 
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
PRIYATHAMDARISI
 

Similar to Git basics (20)

The Fundamentals of Git
The Fundamentals of GitThe Fundamentals of Git
The Fundamentals of Git
 
Introduction to git and githhub with practicals.pptx
Introduction to git and githhub with practicals.pptxIntroduction to git and githhub with practicals.pptx
Introduction to git and githhub with practicals.pptx
 
Advanced Git Tutorial
Advanced Git TutorialAdvanced Git Tutorial
Advanced Git Tutorial
 
Git introduction
Git introductionGit introduction
Git introduction
 
Git and github introduction
Git and github introductionGit and github introduction
Git and github introduction
 
GIT from n00b
GIT from n00bGIT from n00b
GIT from n00b
 
Git & Github
Git & GithubGit & Github
Git & Github
 
Advanted git
Advanted git Advanted git
Advanted git
 
git2.ppt
git2.pptgit2.ppt
git2.ppt
 
Git Commands Every Developer Should Know?
Git Commands Every Developer Should Know?Git Commands Every Developer Should Know?
Git Commands Every Developer Should Know?
 
Github By Nyros Developer
Github By Nyros DeveloperGithub By Nyros Developer
Github By Nyros Developer
 
Git, Beginner to Advanced Survey
Git, Beginner to Advanced SurveyGit, Beginner to Advanced Survey
Git, Beginner to Advanced Survey
 
Git and Github
Git and GithubGit and Github
Git and Github
 
Git for standalone use
Git for standalone useGit for standalone use
Git for standalone use
 
Learn Git Basics
Learn Git BasicsLearn Git Basics
Learn Git Basics
 
Git github
Git githubGit github
Git github
 
Git basic and workflow
Git basic and workflowGit basic and workflow
Git basic and workflow
 
Git presentation to some coworkers some time ago
Git presentation to some coworkers some time agoGit presentation to some coworkers some time ago
Git presentation to some coworkers some time ago
 
Git and github
Git and githubGit and github
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
 

More from Ashwin Date

Building modern frontends for joomla
Building modern frontends for joomlaBuilding modern frontends for joomla
Building modern frontends for joomla
Ashwin Date
 
King of Fruits - Theme based Gamification
King of Fruits - Theme based GamificationKing of Fruits - Theme based Gamification
King of Fruits - Theme based Gamification
Ashwin Date
 
Angular frontends with joomla backend
Angular frontends with joomla backendAngular frontends with joomla backend
Angular frontends with joomla backend
Ashwin Date
 
Revolutionizing kids education using joomla
Revolutionizing kids education using joomlaRevolutionizing kids education using joomla
Revolutionizing kids education using joomla
Ashwin Date
 
Joomla! Itemid amd routing explained
Joomla! Itemid amd routing explainedJoomla! Itemid amd routing explained
Joomla! Itemid amd routing explained
Ashwin Date
 
Caching and Performance Improvememts in Joomla
Caching and Performance Improvememts in JoomlaCaching and Performance Improvememts in Joomla
Caching and Performance Improvememts in Joomla
Ashwin Date
 
Joomla REST API - JoomlaDay Bangkok 2014
Joomla REST API - JoomlaDay Bangkok 2014Joomla REST API - JoomlaDay Bangkok 2014
Joomla REST API - JoomlaDay Bangkok 2014
Ashwin Date
 
10 things you are doing wrong in Joomla
10 things you are doing wrong in Joomla10 things you are doing wrong in Joomla
10 things you are doing wrong in Joomla
Ashwin Date
 
How Joomla powers one of the biggest grain warehouses in India
How Joomla powers one of the biggest grain warehouses in IndiaHow Joomla powers one of the biggest grain warehouses in India
How Joomla powers one of the biggest grain warehouses in India
Ashwin Date
 
Deploying Joomla sites with GIT
Deploying Joomla sites with GITDeploying Joomla sites with GIT
Deploying Joomla sites with GIT
Ashwin Date
 
Joomla REST API
Joomla REST APIJoomla REST API
Joomla REST API
Ashwin Date
 

More from Ashwin Date (11)

Building modern frontends for joomla
Building modern frontends for joomlaBuilding modern frontends for joomla
Building modern frontends for joomla
 
King of Fruits - Theme based Gamification
King of Fruits - Theme based GamificationKing of Fruits - Theme based Gamification
King of Fruits - Theme based Gamification
 
Angular frontends with joomla backend
Angular frontends with joomla backendAngular frontends with joomla backend
Angular frontends with joomla backend
 
Revolutionizing kids education using joomla
Revolutionizing kids education using joomlaRevolutionizing kids education using joomla
Revolutionizing kids education using joomla
 
Joomla! Itemid amd routing explained
Joomla! Itemid amd routing explainedJoomla! Itemid amd routing explained
Joomla! Itemid amd routing explained
 
Caching and Performance Improvememts in Joomla
Caching and Performance Improvememts in JoomlaCaching and Performance Improvememts in Joomla
Caching and Performance Improvememts in Joomla
 
Joomla REST API - JoomlaDay Bangkok 2014
Joomla REST API - JoomlaDay Bangkok 2014Joomla REST API - JoomlaDay Bangkok 2014
Joomla REST API - JoomlaDay Bangkok 2014
 
10 things you are doing wrong in Joomla
10 things you are doing wrong in Joomla10 things you are doing wrong in Joomla
10 things you are doing wrong in Joomla
 
How Joomla powers one of the biggest grain warehouses in India
How Joomla powers one of the biggest grain warehouses in IndiaHow Joomla powers one of the biggest grain warehouses in India
How Joomla powers one of the biggest grain warehouses in India
 
Deploying Joomla sites with GIT
Deploying Joomla sites with GITDeploying Joomla sites with GIT
Deploying Joomla sites with GIT
 
Joomla REST API
Joomla REST APIJoomla REST API
Joomla REST API
 

Recently uploaded

Educational Tour Operators - Edutour.pdf
Educational Tour Operators - Edutour.pdfEducational Tour Operators - Edutour.pdf
Educational Tour Operators - Edutour.pdf
Edu tour
 
Understanding Bus Hire ServicesIN MELBOURNE .pptx
Understanding Bus Hire ServicesIN MELBOURNE .pptxUnderstanding Bus Hire ServicesIN MELBOURNE .pptx
Understanding Bus Hire ServicesIN MELBOURNE .pptx
MELBOURNEBUSHIRE
 
How To Change A Name On American Airlines Ticket.pptx
How To Change A Name On American Airlines Ticket.pptxHow To Change A Name On American Airlines Ticket.pptx
How To Change A Name On American Airlines Ticket.pptx
edqour001namechange
 
在线办理(BU毕业证书)波士顿大学毕业证录取通知书一模一样
在线办理(BU毕业证书)波士顿大学毕业证录取通知书一模一样在线办理(BU毕业证书)波士顿大学毕业证录取通知书一模一样
在线办理(BU毕业证书)波士顿大学毕业证录取通知书一模一样
v6ldcxuq
 
How Do I Plan a Kilimanjaro Climb? 7 Essential Tips Revealed.pdf
How Do I Plan a Kilimanjaro Climb? 7 Essential Tips Revealed.pdfHow Do I Plan a Kilimanjaro Climb? 7 Essential Tips Revealed.pdf
How Do I Plan a Kilimanjaro Climb? 7 Essential Tips Revealed.pdf
Eastafrica Travelcompany
 
What Challenges Await Beginners in Snowshoeing
What Challenges Await Beginners in SnowshoeingWhat Challenges Await Beginners in Snowshoeing
What Challenges Await Beginners in Snowshoeing
Snowshoe Tahoe
 
Exploring the Majesty of Nepal: An Unforgettable Tour Experience
Exploring the Majesty of Nepal: An Unforgettable Tour ExperienceExploring the Majesty of Nepal: An Unforgettable Tour Experience
Exploring the Majesty of Nepal: An Unforgettable Tour Experience
Welcome Nepal Treks and Tours
 
Nature of the task 1. write a paragraph about your trip to dubai and what ar...
Nature of the task  1. write a paragraph about your trip to dubai and what ar...Nature of the task  1. write a paragraph about your trip to dubai and what ar...
Nature of the task 1. write a paragraph about your trip to dubai and what ar...
solutionaia
 
What Outdoor Adventures Await Young Adults in Montreal's Surrounding Nature
What Outdoor Adventures Await Young Adults in Montreal's Surrounding NatureWhat Outdoor Adventures Await Young Adults in Montreal's Surrounding Nature
What Outdoor Adventures Await Young Adults in Montreal's Surrounding Nature
Spade & Palacio Tours
 
Golden Gate Bridge: Magnificent Architecture in San Francisco | CIO Women Mag...
Golden Gate Bridge: Magnificent Architecture in San Francisco | CIO Women Mag...Golden Gate Bridge: Magnificent Architecture in San Francisco | CIO Women Mag...
Golden Gate Bridge: Magnificent Architecture in San Francisco | CIO Women Mag...
CIOWomenMagazine
 
Discovering Egypt A Step-by-Step Guide to Planning Your Trip.ppt
Discovering Egypt A Step-by-Step Guide to Planning Your Trip.pptDiscovering Egypt A Step-by-Step Guide to Planning Your Trip.ppt
Discovering Egypt A Step-by-Step Guide to Planning Your Trip.ppt
Imperial Egypt
 
Excursions in Tahiti Island Adventure
Excursions in Tahiti Island AdventureExcursions in Tahiti Island Adventure
Excursions in Tahiti Island Adventure
Unique Tahiti
 
bangalore metro routes, stations, timings
bangalore metro routes, stations, timingsbangalore metro routes, stations, timings
bangalore metro routes, stations, timings
narinav14
 
How To Change Your Name On American Airlines Aadvantage.pptx
How To Change Your Name On American Airlines Aadvantage.pptxHow To Change Your Name On American Airlines Aadvantage.pptx
How To Change Your Name On American Airlines Aadvantage.pptx
edqour001namechange
 
Un viaje a Buenos Aires y sus alrededores
Un viaje a Buenos Aires y sus alrededoresUn viaje a Buenos Aires y sus alrededores
Un viaje a Buenos Aires y sus alrededores
Judy Hochberg
 
Top 10 Tourist Places in South India to Explore.pdf
Top 10 Tourist Places in South India to Explore.pdfTop 10 Tourist Places in South India to Explore.pdf
Top 10 Tourist Places in South India to Explore.pdf
Savita Yadav
 
Discover the Magic of Ibiza An Unforgettable Boat Trip
Discover the Magic of Ibiza An Unforgettable Boat TripDiscover the Magic of Ibiza An Unforgettable Boat Trip
Discover the Magic of Ibiza An Unforgettable Boat Trip
White Island Charter
 
Ready for Cold Weather Rafting Here's What to Wear to Stay Comfortable!
Ready for Cold Weather Rafting Here's What to Wear to Stay Comfortable!Ready for Cold Weather Rafting Here's What to Wear to Stay Comfortable!
Ready for Cold Weather Rafting Here's What to Wear to Stay Comfortable!
River Recreation - Washington Whitewater Rafting
 
5-Day Nathdwara Tour Itinerary: From Temples to Traditional Markets
5-Day Nathdwara Tour Itinerary: From Temples to Traditional Markets5-Day Nathdwara Tour Itinerary: From Temples to Traditional Markets
5-Day Nathdwara Tour Itinerary: From Temples to Traditional Markets
Parag Goswami
 
Un viaje a Argentina updated xxxxxxxxxxx
Un viaje a Argentina updated xxxxxxxxxxxUn viaje a Argentina updated xxxxxxxxxxx
Un viaje a Argentina updated xxxxxxxxxxx
Judy Hochberg
 

Recently uploaded (20)

Educational Tour Operators - Edutour.pdf
Educational Tour Operators - Edutour.pdfEducational Tour Operators - Edutour.pdf
Educational Tour Operators - Edutour.pdf
 
Understanding Bus Hire ServicesIN MELBOURNE .pptx
Understanding Bus Hire ServicesIN MELBOURNE .pptxUnderstanding Bus Hire ServicesIN MELBOURNE .pptx
Understanding Bus Hire ServicesIN MELBOURNE .pptx
 
How To Change A Name On American Airlines Ticket.pptx
How To Change A Name On American Airlines Ticket.pptxHow To Change A Name On American Airlines Ticket.pptx
How To Change A Name On American Airlines Ticket.pptx
 
在线办理(BU毕业证书)波士顿大学毕业证录取通知书一模一样
在线办理(BU毕业证书)波士顿大学毕业证录取通知书一模一样在线办理(BU毕业证书)波士顿大学毕业证录取通知书一模一样
在线办理(BU毕业证书)波士顿大学毕业证录取通知书一模一样
 
How Do I Plan a Kilimanjaro Climb? 7 Essential Tips Revealed.pdf
How Do I Plan a Kilimanjaro Climb? 7 Essential Tips Revealed.pdfHow Do I Plan a Kilimanjaro Climb? 7 Essential Tips Revealed.pdf
How Do I Plan a Kilimanjaro Climb? 7 Essential Tips Revealed.pdf
 
What Challenges Await Beginners in Snowshoeing
What Challenges Await Beginners in SnowshoeingWhat Challenges Await Beginners in Snowshoeing
What Challenges Await Beginners in Snowshoeing
 
Exploring the Majesty of Nepal: An Unforgettable Tour Experience
Exploring the Majesty of Nepal: An Unforgettable Tour ExperienceExploring the Majesty of Nepal: An Unforgettable Tour Experience
Exploring the Majesty of Nepal: An Unforgettable Tour Experience
 
Nature of the task 1. write a paragraph about your trip to dubai and what ar...
Nature of the task  1. write a paragraph about your trip to dubai and what ar...Nature of the task  1. write a paragraph about your trip to dubai and what ar...
Nature of the task 1. write a paragraph about your trip to dubai and what ar...
 
What Outdoor Adventures Await Young Adults in Montreal's Surrounding Nature
What Outdoor Adventures Await Young Adults in Montreal's Surrounding NatureWhat Outdoor Adventures Await Young Adults in Montreal's Surrounding Nature
What Outdoor Adventures Await Young Adults in Montreal's Surrounding Nature
 
Golden Gate Bridge: Magnificent Architecture in San Francisco | CIO Women Mag...
Golden Gate Bridge: Magnificent Architecture in San Francisco | CIO Women Mag...Golden Gate Bridge: Magnificent Architecture in San Francisco | CIO Women Mag...
Golden Gate Bridge: Magnificent Architecture in San Francisco | CIO Women Mag...
 
Discovering Egypt A Step-by-Step Guide to Planning Your Trip.ppt
Discovering Egypt A Step-by-Step Guide to Planning Your Trip.pptDiscovering Egypt A Step-by-Step Guide to Planning Your Trip.ppt
Discovering Egypt A Step-by-Step Guide to Planning Your Trip.ppt
 
Excursions in Tahiti Island Adventure
Excursions in Tahiti Island AdventureExcursions in Tahiti Island Adventure
Excursions in Tahiti Island Adventure
 
bangalore metro routes, stations, timings
bangalore metro routes, stations, timingsbangalore metro routes, stations, timings
bangalore metro routes, stations, timings
 
How To Change Your Name On American Airlines Aadvantage.pptx
How To Change Your Name On American Airlines Aadvantage.pptxHow To Change Your Name On American Airlines Aadvantage.pptx
How To Change Your Name On American Airlines Aadvantage.pptx
 
Un viaje a Buenos Aires y sus alrededores
Un viaje a Buenos Aires y sus alrededoresUn viaje a Buenos Aires y sus alrededores
Un viaje a Buenos Aires y sus alrededores
 
Top 10 Tourist Places in South India to Explore.pdf
Top 10 Tourist Places in South India to Explore.pdfTop 10 Tourist Places in South India to Explore.pdf
Top 10 Tourist Places in South India to Explore.pdf
 
Discover the Magic of Ibiza An Unforgettable Boat Trip
Discover the Magic of Ibiza An Unforgettable Boat TripDiscover the Magic of Ibiza An Unforgettable Boat Trip
Discover the Magic of Ibiza An Unforgettable Boat Trip
 
Ready for Cold Weather Rafting Here's What to Wear to Stay Comfortable!
Ready for Cold Weather Rafting Here's What to Wear to Stay Comfortable!Ready for Cold Weather Rafting Here's What to Wear to Stay Comfortable!
Ready for Cold Weather Rafting Here's What to Wear to Stay Comfortable!
 
5-Day Nathdwara Tour Itinerary: From Temples to Traditional Markets
5-Day Nathdwara Tour Itinerary: From Temples to Traditional Markets5-Day Nathdwara Tour Itinerary: From Temples to Traditional Markets
5-Day Nathdwara Tour Itinerary: From Temples to Traditional Markets
 
Un viaje a Argentina updated xxxxxxxxxxx
Un viaje a Argentina updated xxxxxxxxxxxUn viaje a Argentina updated xxxxxxxxxxx
Un viaje a Argentina updated xxxxxxxxxxx
 

Git basics

  • 1. Basics of GIT Ashwin Date Durgesh Sonawane
  • 2. DO GIT like a BOSS !! Fear कडून confidence कडे
  • 4. Github/Gitlab - Ab Bitbucket kidhar se aya ? - Github and Bitbucket are cloud based repository hosting services. Similar to web servers, GIT servers store your repository and allow SSH & HTTP connection - Gitlab is a self hosted service. We’re hosting it on Amazon - A “REMOTE” GIT repository can live anywhere - Remember it used to be on our old 192.168.1.200 server ?
  • 5. GIT is *Distributed* Version Control - Durgesh’s Local Copy (Durgesh’s Clone) - Sachin’s Local Copy (Sachin’s Clone) - Nidhi’s Local Copy (Nidhi’s Clone) - GIT Server (Remote) - No Need to be online to “COMMIT”
  • 6. Remote pe Charcha - Any GIT server can be added as a “REMOTE” - You may add multiple “REMOTE”s to your local repository - You “COMMIT” changes to a local clone and “PUSH” changes to a remote
  • 7. Making a Fork - Fork is a copy of someone else’s repository created under your own account - You “PUSH” to your own fork and then ask the original repository owner to merge your changes TIP : Your fork needs to be updated by pushing the changes from the original repo, it won’t update itself :)
  • 8. Clone and get going! - Cloning will create a “CLONE” of your remote GIT repository on your computer - The remote GIT repository is auto configured with the name “ORIGIN” - You can then add additional REMOTEs with other names - If your repository is a fork, then add a new remote named “UPSTREAM” pointing to the original repo that you forked from - git clone git@github.com/joomla/joomla-
  • 9. Getting started with development - Once you clone start making changes to your files - git add <file path> - git rm <file path> - This adds your new and changed files to the list of files that will be committed - You haven’t committed yet - Deleted files *also* need to be committed - You haven’t committed yet - This adds your changes to the list of files that will be committed
  • 10. तुका म्हणे || commit म्हणजे push नव्हे || - git push origin master - This will push your files to the remote GIT repo named origin (your fork)
  • 11. Getting other people’s changes - You’re not the only one making commits and pushing - Remember Sachin and Nidhi also cloned - They also saw this and pushed - To get their changes - git pull origin master - What if they changed the same files that I worked on
  • 12. तुका म्हणे || conflict ला भिऊ नकोस || || file बघून करशील merge || Merge conflicts will happen when you edit the same piece of code in the same file that someone else has worked on You simply need to open the file and manually merge the conflicts
  • 14. When you have leftover, uncommitted work
  • 15. तुका म्हणे || conflict ला भिऊ नकोस || || file बघून करशील merge || Merge conflicts will happen when you edit the same piece of code in the same file that someone else has worked on You simply need to open the file and manually merge the conflicts
  • 16. Tagging in GIT - Tags are used to “Tag” releases so that the state of files against that tag get locked, and can be referred in the future - git tag v5.0 - git push --tags - git pull --tags
  • 17. GIT Gotchas - git config core.fileMode false Ignores chmod changes from being tracked in GIT - Use the .gitignore file This will stop images, backups from being committed and pushed - Undo git add git reset <file path> - Reverting all changes to a file to the the latest commit - git checkout <file path>
  • 18. GIT Best Practices - git pull - Pull other people’s changes frequently to stay updated - No temporary work on master Use branches to work on temporary stuff, don’t pollute your master branch
  • 19. Working with Multiple REMOTEs - Useful when you are working on your own “FORK” - git remote add upstream <git repo URL> - upstream is the name of the remote server - You can name it anything you want :) - git push upstream master - Pushes your changes to the upstream remote GIT server