SlideShare a Scribd company logo
Git (and github) for stand alone use
Ikuru K
What is git?
● A better version control system
● Freely available and open source
● What are version control systems good for?
Google it!
Brief history
● Linux project was initially using the bit keeper service, but
one of the contributors reverse engineered the protocol,
and made the provider angry, and Linux project got
banned from using the service.
● Linux's original author decided to make a version control
system that scales up with the project size, that also works
in a distributed manner.
● Linux original author passed the maintainer role to another
developer, and git has been evolving since.
Version control jargons
● Fluffy concept, but used frequently.
● Definitions are subjective, so feedback is
appreciated.
● Checkout/branch, commit, push, pull/merge.
Checkout/branch
● Point where change starts to be made
● Implication that it is always possible to return to
the checkout point, in case of some code
breakage that is not possible to recover.
Git repository, index, and
workspace.
● Changes made to your files exist in the
workspace.
● git add will move those changes to the index.
● Committing those changes will move whats in
the index to the repository object store.
● This three phase system allows the messy part
of the scratching prettier, and less garbage gets
committed as a result.
Commit
● In git context, a commit is a set of changes made to
the code base.
– More than a simple “save”
● Granularity is often subject of discussion
– If too much is changed in a single commit, then there is not
much point of it.
– If related changes are scattered across multiple commits,
life will be hard.
– Seems like work possible to be described in one sentence
is a good rule of thumb
Push
● Reflect the changes made by you to some
other entity. i.e. publish your commits
– Remote repository/ other person
– “Change made today will be pushed to production”
– “Please don't push garbage to our repository”
Pull
● Incorporate changes to a domain you have
control.
– If working on a local version of famous project
(MySql for instance), frequently pull changes.
Getting git on your machine
● For debian/ubuntu, $sudo apt-get install git
● For rhel/centos, look into yum
● For Windows and mac, respective clients are
available.
● (Google will explain this better)
Starting Project
● Create empty directory on file system
● Run $ git init
● Files and directories for git use will be created,
and git will track changes made to files created
in the file structure.
First commit ever
● Write a file, save.
● $ git status
– Will show files modified since last commit
● $ git diff
– Show line by line detail of the change since last commit.
● $ git add <filename>
– Tell git that file is ready to commit
● $ git commit -m “commit message”
– Officially commits the change
Too much has been modified since last commit,
and a simple commit msg cannot describe what
has been done?
● $ git add –patch <filename>
– Can interactively split up what gets staged to be
committed
Check what is to be committed
● $git commit -v
– Editor will open with detail of the commit detail.
– Write message and commit.
git rm --cached file.txt
● Use when you want to remove a file from the
repository, but want to keep in the file system.
● Also add such file to .gitignore file.
Remote/Github linkage
● All is lost if your PC blows, so remote repo is a
good idea.
● $git remote add origin <url of repository>
– Tells git where to push commits
● $git push origin master
– Push the commits to the remote repository
–
Checkout for stand alone use
● $git checkout <filename>
– Discard changes made since latest commit
– Good when you know program was working at the time when
latest commit was made
● $git checkout -b <branch name>
– Commits made after this will not affect the master branch
– The best habit is to always work on branches, and merge the
work from the master
– i.e. $git checkout master, followed by
$git merge <branch name>
Ad

More Related Content

What's hot (20)

Github
GithubGithub
Github
IFEDAYO ADEYEMI
 
Git Introduction
Git IntroductionGit Introduction
Git Introduction
Anil Wadghule
 
Git slides
Git slidesGit slides
Git slides
Nguyen Van Hung
 
Github
GithubGithub
Github
abdulkareem_nm
 
Using Git and BitBucket
Using Git and BitBucketUsing Git and BitBucket
Using Git and BitBucket
Medhat Dawoud
 
Git Workshop : Getting Started
Git Workshop : Getting StartedGit Workshop : Getting Started
Git Workshop : Getting Started
Wildan Maulana
 
Git Tutorial
Git TutorialGit Tutorial
Git Tutorial
Pranav Kulkarni
 
Introduction to Git
Introduction to GitIntroduction to Git
Introduction to Git
Yan Vugenfirer
 
Git and GitHub
Git and GitHubGit and GitHub
Git and GitHub
Rick Umali
 
Git basics
Git basicsGit basics
Git basics
Amit Sawhney
 
Introduction to git
Introduction to gitIntroduction to git
Introduction to git
Shilu Shrestha
 
Intro to Git & GitHub
Intro to Git & GitHubIntro to Git & GitHub
Intro to Git & GitHub
GoogleDevelopersStud
 
Brush up on using github
Brush up on using githubBrush up on using github
Brush up on using github
Sebin Benjamin
 
Git and GitHub | Concept about Git and GitHub Process | Git Process overview
Git and GitHub | Concept about Git and GitHub Process | Git Process overviewGit and GitHub | Concept about Git and GitHub Process | Git Process overview
Git and GitHub | Concept about Git and GitHub Process | Git Process overview
Rueful Robin
 
Introduction to git and Github
Introduction to git and GithubIntroduction to git and Github
Introduction to git and Github
Wycliff1
 
Git and Github Session
Git and Github SessionGit and Github Session
Git and Github Session
GoogleDevelopersStud1
 
Git & git hub
Git & git hubGit & git hub
Git & git hub
PreetikaKanojia
 
Git and github fundamentals
Git and github fundamentalsGit and github fundamentals
Git and github fundamentals
RajKharvar
 
Contributing to open source using Git
Contributing to open source using GitContributing to open source using Git
Contributing to open source using Git
Yan Vugenfirer
 
Git n git hub
Git n git hubGit n git hub
Git n git hub
Jiwon Baek
 
Using Git and BitBucket
Using Git and BitBucketUsing Git and BitBucket
Using Git and BitBucket
Medhat Dawoud
 
Git Workshop : Getting Started
Git Workshop : Getting StartedGit Workshop : Getting Started
Git Workshop : Getting Started
Wildan Maulana
 
Git and GitHub
Git and GitHubGit and GitHub
Git and GitHub
Rick Umali
 
Brush up on using github
Brush up on using githubBrush up on using github
Brush up on using github
Sebin Benjamin
 
Git and GitHub | Concept about Git and GitHub Process | Git Process overview
Git and GitHub | Concept about Git and GitHub Process | Git Process overviewGit and GitHub | Concept about Git and GitHub Process | Git Process overview
Git and GitHub | Concept about Git and GitHub Process | Git Process overview
Rueful Robin
 
Introduction to git and Github
Introduction to git and GithubIntroduction to git and Github
Introduction to git and Github
Wycliff1
 
Git and github fundamentals
Git and github fundamentalsGit and github fundamentals
Git and github fundamentals
RajKharvar
 
Contributing to open source using Git
Contributing to open source using GitContributing to open source using Git
Contributing to open source using Git
Yan Vugenfirer
 

Similar to Git for standalone use (20)

Mini-training: Let’s Git It!
Mini-training: Let’s Git It!Mini-training: Let’s Git It!
Mini-training: Let’s Git It!
Betclic Everest Group Tech Team
 
Git basics
Git basicsGit basics
Git basics
GHARSALLAH Mohamed
 
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
 
Introduction to Git and Github
Introduction to Git and GithubIntroduction to Git and Github
Introduction to Git and Github
Md Atique Ahmed Ziad
 
Git introduction
Git introductionGit introduction
Git introduction
satyendrajaladi
 
Git Session 2K23.pptx
Git Session 2K23.pptxGit Session 2K23.pptx
Git Session 2K23.pptx
Eshaan35
 
Git and Github
Git and GithubGit and Github
Git and Github
Teodora Ahkozidou
 
Git and github
Git and githubGit and github
Git and github
Teodora Ahkozidou
 
Version control and GIT Primer
Version control and GIT PrimerVersion control and GIT Primer
Version control and GIT Primer
saadulde
 
Git Mastery
Git MasteryGit Mastery
Git Mastery
ShehryarSH1
 
Introduction to git hub
Introduction to git hubIntroduction to git hub
Introduction to git hub
Naveen Pandey
 
Introduction to Git and Github - Google Developer Student Clubs CET, Trivandrum
Introduction to Git and Github - Google Developer Student Clubs CET, TrivandrumIntroduction to Git and Github - Google Developer Student Clubs CET, Trivandrum
Introduction to Git and Github - Google Developer Student Clubs CET, Trivandrum
AbhijitNarayan2
 
Git&GitHub.pptx
Git&GitHub.pptxGit&GitHub.pptx
Git&GitHub.pptx
KondiVenkatesh1
 
GIT.pptx
GIT.pptxGIT.pptx
GIT.pptx
Soumen Debgupta
 
GitHub Event.pptx
GitHub Event.pptxGitHub Event.pptx
GitHub Event.pptx
KeerthanaJ32
 
Advanced Git Tutorial
Advanced Git TutorialAdvanced Git Tutorial
Advanced Git Tutorial
Sage Sharp
 
Learn Git Basics
Learn Git BasicsLearn Git Basics
Learn Git Basics
Prakash Dantuluri
 
Git workshop
Git workshopGit workshop
Git workshop
Reslan Al Tinawi
 
An introductory guide to GIT
An introductory guide to GITAn introductory guide to GIT
An introductory guide to GIT
Amith jayasekara
 
Ad

More from Ikuru Kanuma (20)

clj and deps.edn
clj and deps.ednclj and deps.edn
clj and deps.edn
Ikuru Kanuma
 
Kukutei shinkoku with Clojure
Kukutei shinkoku with ClojureKukutei shinkoku with Clojure
Kukutei shinkoku with Clojure
Ikuru Kanuma
 
Locarise,reagent and JavaScript Libraries
Locarise,reagent and JavaScript LibrariesLocarise,reagent and JavaScript Libraries
Locarise,reagent and JavaScript Libraries
Ikuru Kanuma
 
clara-rules
clara-rulesclara-rules
clara-rules
Ikuru Kanuma
 
ClojureScript@node
ClojureScript@nodeClojureScript@node
ClojureScript@node
Ikuru Kanuma
 
Welcome to ClojureScript
Welcome to ClojureScriptWelcome to ClojureScript
Welcome to ClojureScript
Ikuru Kanuma
 
Clojure web dev history
Clojure web dev historyClojure web dev history
Clojure web dev history
Ikuru Kanuma
 
Arachne Unweaved (JP)
Arachne Unweaved (JP)Arachne Unweaved (JP)
Arachne Unweaved (JP)
Ikuru Kanuma
 
Clojureでガラケーサイトを作る際の細かい話
Clojureでガラケーサイトを作る際の細かい話Clojureでガラケーサイトを作る際の細かい話
Clojureでガラケーサイトを作る際の細かい話
Ikuru Kanuma
 
Web forms made easy (with formative)
Web forms made easy (with formative)Web forms made easy (with formative)
Web forms made easy (with formative)
Ikuru Kanuma
 
サムネイルを作る話
サムネイルを作る話サムネイルを作る話
サムネイルを作る話
Ikuru Kanuma
 
Review June2015 Dec2015
Review June2015 Dec2015Review June2015 Dec2015
Review June2015 Dec2015
Ikuru Kanuma
 
Redmine on amazon ec2
Redmine on amazon ec2Redmine on amazon ec2
Redmine on amazon ec2
Ikuru Kanuma
 
Engineering Ethics (In Japanese)
Engineering Ethics (In Japanese)Engineering Ethics (In Japanese)
Engineering Ethics (In Japanese)
Ikuru Kanuma
 
First Real Pull Request Ever
First Real Pull Request EverFirst Real Pull Request Ever
First Real Pull Request Ever
Ikuru Kanuma
 
Pyunit
PyunitPyunit
Pyunit
Ikuru Kanuma
 
Review june2014 june2015
Review june2014 june2015Review june2014 june2015
Review june2014 june2015
Ikuru Kanuma
 
Elementary vim tricks
Elementary vim tricksElementary vim tricks
Elementary vim tricks
Ikuru Kanuma
 
Processors in a nutshell
Processors in a nutshellProcessors in a nutshell
Processors in a nutshell
Ikuru Kanuma
 
Computer hardware, and network
Computer hardware, and networkComputer hardware, and network
Computer hardware, and network
Ikuru Kanuma
 
Kukutei shinkoku with Clojure
Kukutei shinkoku with ClojureKukutei shinkoku with Clojure
Kukutei shinkoku with Clojure
Ikuru Kanuma
 
Locarise,reagent and JavaScript Libraries
Locarise,reagent and JavaScript LibrariesLocarise,reagent and JavaScript Libraries
Locarise,reagent and JavaScript Libraries
Ikuru Kanuma
 
ClojureScript@node
ClojureScript@nodeClojureScript@node
ClojureScript@node
Ikuru Kanuma
 
Welcome to ClojureScript
Welcome to ClojureScriptWelcome to ClojureScript
Welcome to ClojureScript
Ikuru Kanuma
 
Clojure web dev history
Clojure web dev historyClojure web dev history
Clojure web dev history
Ikuru Kanuma
 
Arachne Unweaved (JP)
Arachne Unweaved (JP)Arachne Unweaved (JP)
Arachne Unweaved (JP)
Ikuru Kanuma
 
Clojureでガラケーサイトを作る際の細かい話
Clojureでガラケーサイトを作る際の細かい話Clojureでガラケーサイトを作る際の細かい話
Clojureでガラケーサイトを作る際の細かい話
Ikuru Kanuma
 
Web forms made easy (with formative)
Web forms made easy (with formative)Web forms made easy (with formative)
Web forms made easy (with formative)
Ikuru Kanuma
 
サムネイルを作る話
サムネイルを作る話サムネイルを作る話
サムネイルを作る話
Ikuru Kanuma
 
Review June2015 Dec2015
Review June2015 Dec2015Review June2015 Dec2015
Review June2015 Dec2015
Ikuru Kanuma
 
Redmine on amazon ec2
Redmine on amazon ec2Redmine on amazon ec2
Redmine on amazon ec2
Ikuru Kanuma
 
Engineering Ethics (In Japanese)
Engineering Ethics (In Japanese)Engineering Ethics (In Japanese)
Engineering Ethics (In Japanese)
Ikuru Kanuma
 
First Real Pull Request Ever
First Real Pull Request EverFirst Real Pull Request Ever
First Real Pull Request Ever
Ikuru Kanuma
 
Review june2014 june2015
Review june2014 june2015Review june2014 june2015
Review june2014 june2015
Ikuru Kanuma
 
Elementary vim tricks
Elementary vim tricksElementary vim tricks
Elementary vim tricks
Ikuru Kanuma
 
Processors in a nutshell
Processors in a nutshellProcessors in a nutshell
Processors in a nutshell
Ikuru Kanuma
 
Computer hardware, and network
Computer hardware, and networkComputer hardware, and network
Computer hardware, and network
Ikuru Kanuma
 
Ad

Recently uploaded (13)

Unlocking the Secrets of Love: The Science Behind Heartfelt Connections
Unlocking the Secrets of Love: The Science Behind Heartfelt ConnectionsUnlocking the Secrets of Love: The Science Behind Heartfelt Connections
Unlocking the Secrets of Love: The Science Behind Heartfelt Connections
Vikash Gautam
 
Cognitive development revised - Copy.ppt
Cognitive development revised - Copy.pptCognitive development revised - Copy.ppt
Cognitive development revised - Copy.ppt
MasahiroNagasawa1
 
Sentence-Errors.pptxssssssssssssssssssss
Sentence-Errors.pptxssssssssssssssssssssSentence-Errors.pptxssssssssssssssssssss
Sentence-Errors.pptxssssssssssssssssssss
rexjosiahzosa
 
crucial-conversations-training-powerpoint.pptx
crucial-conversations-training-powerpoint.pptxcrucial-conversations-training-powerpoint.pptx
crucial-conversations-training-powerpoint.pptx
vikramdas40
 
ee case study and evaluation of biodiesel
ee case study and evaluation of biodieselee case study and evaluation of biodiesel
ee case study and evaluation of biodiesel
SwaroopDalvi
 
Erikson’s theory , 8-stages of life , their importance
Erikson’s theory , 8-stages of life , their importanceErikson’s theory , 8-stages of life , their importance
Erikson’s theory , 8-stages of life , their importance
uf415127
 
Pengenalan Berpikir Kritis Critical_Thinking_Intro.pptx
Pengenalan Berpikir Kritis Critical_Thinking_Intro.pptxPengenalan Berpikir Kritis Critical_Thinking_Intro.pptx
Pengenalan Berpikir Kritis Critical_Thinking_Intro.pptx
JabbarAPanggabean
 
Spain is a country in southwestern Europe, located on the Iberian Peninsula. ...
Spain is a country in southwestern Europe, located on the Iberian Peninsula. ...Spain is a country in southwestern Europe, located on the Iberian Peninsula. ...
Spain is a country in southwestern Europe, located on the Iberian Peninsula. ...
leonardoquispeyapu6
 
Embracing Adaptability (setback) - Istvan Patzay
Embracing Adaptability (setback) - Istvan PatzayEmbracing Adaptability (setback) - Istvan Patzay
Embracing Adaptability (setback) - Istvan Patzay
isti84
 
Violence against women , finding from the 2008 national demografic
Violence against women , finding from the 2008 national demograficViolence against women , finding from the 2008 national demografic
Violence against women , finding from the 2008 national demografic
oppateamo1234
 
How to Prepare for and Survive a Power Outage
How to Prepare for and Survive a Power OutageHow to Prepare for and Survive a Power Outage
How to Prepare for and Survive a Power Outage
Bob Mayer
 
Emotions and emotional intelligence skills
Emotions and emotional intelligence skillsEmotions and emotional intelligence skills
Emotions and emotional intelligence skills
DRKAMINIBHASIN
 
CUTS Report by JOHN MEYNARD BARRUGA BAUTISTA, SHENE MERRYLAND BAUTISTA, AND A...
CUTS Report by JOHN MEYNARD BARRUGA BAUTISTA, SHENE MERRYLAND BAUTISTA, AND A...CUTS Report by JOHN MEYNARD BARRUGA BAUTISTA, SHENE MERRYLAND BAUTISTA, AND A...
CUTS Report by JOHN MEYNARD BARRUGA BAUTISTA, SHENE MERRYLAND BAUTISTA, AND A...
johnmeynardbautista9
 
Unlocking the Secrets of Love: The Science Behind Heartfelt Connections
Unlocking the Secrets of Love: The Science Behind Heartfelt ConnectionsUnlocking the Secrets of Love: The Science Behind Heartfelt Connections
Unlocking the Secrets of Love: The Science Behind Heartfelt Connections
Vikash Gautam
 
Cognitive development revised - Copy.ppt
Cognitive development revised - Copy.pptCognitive development revised - Copy.ppt
Cognitive development revised - Copy.ppt
MasahiroNagasawa1
 
Sentence-Errors.pptxssssssssssssssssssss
Sentence-Errors.pptxssssssssssssssssssssSentence-Errors.pptxssssssssssssssssssss
Sentence-Errors.pptxssssssssssssssssssss
rexjosiahzosa
 
crucial-conversations-training-powerpoint.pptx
crucial-conversations-training-powerpoint.pptxcrucial-conversations-training-powerpoint.pptx
crucial-conversations-training-powerpoint.pptx
vikramdas40
 
ee case study and evaluation of biodiesel
ee case study and evaluation of biodieselee case study and evaluation of biodiesel
ee case study and evaluation of biodiesel
SwaroopDalvi
 
Erikson’s theory , 8-stages of life , their importance
Erikson’s theory , 8-stages of life , their importanceErikson’s theory , 8-stages of life , their importance
Erikson’s theory , 8-stages of life , their importance
uf415127
 
Pengenalan Berpikir Kritis Critical_Thinking_Intro.pptx
Pengenalan Berpikir Kritis Critical_Thinking_Intro.pptxPengenalan Berpikir Kritis Critical_Thinking_Intro.pptx
Pengenalan Berpikir Kritis Critical_Thinking_Intro.pptx
JabbarAPanggabean
 
Spain is a country in southwestern Europe, located on the Iberian Peninsula. ...
Spain is a country in southwestern Europe, located on the Iberian Peninsula. ...Spain is a country in southwestern Europe, located on the Iberian Peninsula. ...
Spain is a country in southwestern Europe, located on the Iberian Peninsula. ...
leonardoquispeyapu6
 
Embracing Adaptability (setback) - Istvan Patzay
Embracing Adaptability (setback) - Istvan PatzayEmbracing Adaptability (setback) - Istvan Patzay
Embracing Adaptability (setback) - Istvan Patzay
isti84
 
Violence against women , finding from the 2008 national demografic
Violence against women , finding from the 2008 national demograficViolence against women , finding from the 2008 national demografic
Violence against women , finding from the 2008 national demografic
oppateamo1234
 
How to Prepare for and Survive a Power Outage
How to Prepare for and Survive a Power OutageHow to Prepare for and Survive a Power Outage
How to Prepare for and Survive a Power Outage
Bob Mayer
 
Emotions and emotional intelligence skills
Emotions and emotional intelligence skillsEmotions and emotional intelligence skills
Emotions and emotional intelligence skills
DRKAMINIBHASIN
 
CUTS Report by JOHN MEYNARD BARRUGA BAUTISTA, SHENE MERRYLAND BAUTISTA, AND A...
CUTS Report by JOHN MEYNARD BARRUGA BAUTISTA, SHENE MERRYLAND BAUTISTA, AND A...CUTS Report by JOHN MEYNARD BARRUGA BAUTISTA, SHENE MERRYLAND BAUTISTA, AND A...
CUTS Report by JOHN MEYNARD BARRUGA BAUTISTA, SHENE MERRYLAND BAUTISTA, AND A...
johnmeynardbautista9
 

Git for standalone use

  • 1. Git (and github) for stand alone use Ikuru K
  • 2. What is git? ● A better version control system ● Freely available and open source ● What are version control systems good for? Google it!
  • 3. Brief history ● Linux project was initially using the bit keeper service, but one of the contributors reverse engineered the protocol, and made the provider angry, and Linux project got banned from using the service. ● Linux's original author decided to make a version control system that scales up with the project size, that also works in a distributed manner. ● Linux original author passed the maintainer role to another developer, and git has been evolving since.
  • 4. Version control jargons ● Fluffy concept, but used frequently. ● Definitions are subjective, so feedback is appreciated. ● Checkout/branch, commit, push, pull/merge.
  • 5. Checkout/branch ● Point where change starts to be made ● Implication that it is always possible to return to the checkout point, in case of some code breakage that is not possible to recover.
  • 6. Git repository, index, and workspace. ● Changes made to your files exist in the workspace. ● git add will move those changes to the index. ● Committing those changes will move whats in the index to the repository object store. ● This three phase system allows the messy part of the scratching prettier, and less garbage gets committed as a result.
  • 7. Commit ● In git context, a commit is a set of changes made to the code base. – More than a simple “save” ● Granularity is often subject of discussion – If too much is changed in a single commit, then there is not much point of it. – If related changes are scattered across multiple commits, life will be hard. – Seems like work possible to be described in one sentence is a good rule of thumb
  • 8. Push ● Reflect the changes made by you to some other entity. i.e. publish your commits – Remote repository/ other person – “Change made today will be pushed to production” – “Please don't push garbage to our repository”
  • 9. Pull ● Incorporate changes to a domain you have control. – If working on a local version of famous project (MySql for instance), frequently pull changes.
  • 10. Getting git on your machine ● For debian/ubuntu, $sudo apt-get install git ● For rhel/centos, look into yum ● For Windows and mac, respective clients are available. ● (Google will explain this better)
  • 11. Starting Project ● Create empty directory on file system ● Run $ git init ● Files and directories for git use will be created, and git will track changes made to files created in the file structure.
  • 12. First commit ever ● Write a file, save. ● $ git status – Will show files modified since last commit ● $ git diff – Show line by line detail of the change since last commit. ● $ git add <filename> – Tell git that file is ready to commit ● $ git commit -m “commit message” – Officially commits the change
  • 13. Too much has been modified since last commit, and a simple commit msg cannot describe what has been done? ● $ git add –patch <filename> – Can interactively split up what gets staged to be committed
  • 14. Check what is to be committed ● $git commit -v – Editor will open with detail of the commit detail. – Write message and commit.
  • 15. git rm --cached file.txt ● Use when you want to remove a file from the repository, but want to keep in the file system. ● Also add such file to .gitignore file.
  • 16. Remote/Github linkage ● All is lost if your PC blows, so remote repo is a good idea. ● $git remote add origin <url of repository> – Tells git where to push commits ● $git push origin master – Push the commits to the remote repository –
  • 17. Checkout for stand alone use ● $git checkout <filename> – Discard changes made since latest commit – Good when you know program was working at the time when latest commit was made ● $git checkout -b <branch name> – Commits made after this will not affect the master branch – The best habit is to always work on branches, and merge the work from the master – i.e. $git checkout master, followed by $git merge <branch name>