狠狠撸

狠狠撸Share a Scribd company logo
GIT VERSION CONTROL
GIT
GIT is one of the distributed version control systems that helps in
? Tracking code revision history
? Sharing codebase with collaborator
? Merging collaborators code with your code
GIT: ADVANTAGES
? Performance: In GIT Code changes can be easily committed, compared and merged. This
is because GIT is object based and object formats of GIT repository use several
combinations of delta encoding to store metadata objects and directory contents.
? Security: GIT maintains the integrity of source code. File contents, as well as the
relationship between files/directories, are secured via an algorithm which protects the
code and code history against accidental damage.
? Flexibility: GIT is uniquely designed to support tagging and branching operations and
store each activity carried out by the user as an integral part of “change” history.
? Open Source: GIT is a widely used open source version control with acceptance for more
than 10 years. It is a widely-accepted system owing to its universally accepted usability
and performance standards.
GIT: DISADVANTAGES
× For doing a small operation(s), a lot of commands are needed in GIT.
× For Binary file like images, on-text files GIT becomes slow.
× Bad command line syntax which is arbitrary and inconsistent.
× For a beginner, it’s a steep learning curve to learn so many commands and it’s
parameters.
GIT: COMMANDS
? Init: Used to initialize a git repository from an existing directory of files
$ git init
? Clone: Used to get a copy of the project into your local machine
$ git clone <githuburl>
? Status: Used to view the status and changes of the directory on which you are
working on and staging area.
$ git status
GIT: COMMANDS
? Add: Used to add files and directories to git staging areas before you can commit
them.
$ git add my_new_file.txt
? Commit: Used to record a snapshot of git’s staging area
$ git commit -m “Add three files“
? Reset: Used to undo all changes and commits
$ git reset –soft HEAD^
GIT: COMMANDS
? Pull: Used to fetch files from remote repo and try to merge with your current branch
$ git pull
? Push: Used to push new branches and data in the staging area to the remote repo
$ git push -u origin master
? Branch: Used to create, manage and list branches
$ git branch
? Checkout: Used to switch from one branch to another branch
$ git checkout user-profile
? Merge: Used to merge a branch into your current branch
$ git merge <branchname>
? Log:Used to show commit history of your current branch
QUESTIONS
Ad

Recommended

Introduction to Git and Github
Introduction to Git and Github
Md Atique Ahmed Ziad
?
Git for standalone use
Git for standalone use
Ikuru Kanuma
?
Git Workshop : Getting Started
Git Workshop : Getting Started
Wildan Maulana
?
EGit 3.0 and beyond
EGit 3.0 and beyond
msohn
?
News from Git in Java Land
News from Git in Java Land
msohn
?
Introduction To Git
Introduction To Git
Nikhil Vishnu P.V
?
Terrible Ideas in Git - Corey Quinn, FutureAdvisor - DevOpsDays Tel Aviv 2015
Terrible Ideas in Git - Corey Quinn, FutureAdvisor - DevOpsDays Tel Aviv 2015
DevOpsDays Tel Aviv
?
How to store large binary files in git repositories
How to store large binary files in git repositories
Matt Aunger
?
Git
Git
Keshavaprasad Bangalore Seshadri
?
Git rewriting git history
Git rewriting git history
LearningTech
?
Change history with Git
Change history with Git
gsterndale
?
Git: Git'ing the Basic
Git: Git'ing the Basic
Gerald Villorente
?
Nyc Code Camp 2010 Git And Github
Nyc Code Camp 2010 Git And Github
jptoto
?
GIT_training_SoftServeBulgaria2016
GIT_training_SoftServeBulgaria2016
Peter Denev
?
Difference between gitlab vs github vs bitbucket
Difference between gitlab vs github vs bitbucket
Acodez IT Solutions
?
18 Git #burningkeyboards
18 Git #burningkeyboards
Denis Ristic
?
Git for developers
Git for developers
Hacen Dadda
?
Getting Started with Git and GitHub
Getting Started with Git and GitHub
Rabiraj Khadka
?
Git slides
Git slides
Nguyen Van Hung
?
Intro to Git, GitHub, and BitBucket
Intro to Git, GitHub, and BitBucket
Legal Services National Technology Assistance Project (LSNTAP)
?
Introduction to git
Introduction to git
Ahmed Fathallah
?
Git locally git rm/revert/reset
Git locally git rm/revert/reset
ahmadezzeir
?
Version Control System - Git
Version Control System - Git
Carlo Bernaschina
?
Advance workshop on git
Advance workshop on git
Himanshu Agrawal
?
Git hub
Git hub
Nitin Goel
?
Getting Started with Git: A Primer for SVN and TFS Users
Getting Started with Git: A Primer for SVN and TFS Users
Noam Kfir
?
Introduction to Git
Introduction to Git
Yan Vugenfirer
?
Git introduction for Beginners
Git introduction for Beginners
MortezaTaghaddomi
?
Git: be social
Git: be social
Geronimo Orozco
?
Git hub_pptx
Git hub_pptx
PathanNadhiyaSulthan
?

More Related Content

What's hot (16)

Git
Git
Keshavaprasad Bangalore Seshadri
?
Git rewriting git history
Git rewriting git history
LearningTech
?
Change history with Git
Change history with Git
gsterndale
?
Git: Git'ing the Basic
Git: Git'ing the Basic
Gerald Villorente
?
Nyc Code Camp 2010 Git And Github
Nyc Code Camp 2010 Git And Github
jptoto
?
GIT_training_SoftServeBulgaria2016
GIT_training_SoftServeBulgaria2016
Peter Denev
?
Difference between gitlab vs github vs bitbucket
Difference between gitlab vs github vs bitbucket
Acodez IT Solutions
?
18 Git #burningkeyboards
18 Git #burningkeyboards
Denis Ristic
?
Git for developers
Git for developers
Hacen Dadda
?
Getting Started with Git and GitHub
Getting Started with Git and GitHub
Rabiraj Khadka
?
Git slides
Git slides
Nguyen Van Hung
?
Intro to Git, GitHub, and BitBucket
Intro to Git, GitHub, and BitBucket
Legal Services National Technology Assistance Project (LSNTAP)
?
Introduction to git
Introduction to git
Ahmed Fathallah
?
Git locally git rm/revert/reset
Git locally git rm/revert/reset
ahmadezzeir
?
Version Control System - Git
Version Control System - Git
Carlo Bernaschina
?
Advance workshop on git
Advance workshop on git
Himanshu Agrawal
?

Similar to Git-Basics (20)

Git hub
Git hub
Nitin Goel
?
Getting Started with Git: A Primer for SVN and TFS Users
Getting Started with Git: A Primer for SVN and TFS Users
Noam Kfir
?
Introduction to Git
Introduction to Git
Yan Vugenfirer
?
Git introduction for Beginners
Git introduction for Beginners
MortezaTaghaddomi
?
Git: be social
Git: be social
Geronimo Orozco
?
Git hub_pptx
Git hub_pptx
PathanNadhiyaSulthan
?
Learning Basic GIT Cmd
Learning Basic GIT Cmd
srinathcox
?
Version controll.pptx
Version controll.pptx
Md. Main Uddin Rony
?
Introduction to Git
Introduction to Git
atishgoswami
?
Version Control with Git
Version Control with Git
Sahil Agarwal
?
Collaborative development with Git | Workshop
Collaborative development with Git | Workshop
Anuchit Chalothorn
?
Git and github
Git and github
Teodora Ahkozidou
?
Introduction git
Introduction git
Dian Sigit Prastowo
?
Introduction to Git and Github - Google Developer Student Clubs CET, Trivandrum
Introduction to Git and Github - Google Developer Student Clubs CET, Trivandrum
AbhijitNarayan2
?
Git presentation
Git presentation
Sai Kumar Satapathy
?
GIT & Github introduction for beginners
GIT & Github introduction for beginners
riteshsingh3651
?
Introduction to GitHub, Open Source and Tech Article
Introduction to GitHub, Open Source and Tech Article
PRIYATHAMDARISI
?
Git.pptx
Git.pptx
PalashIMS
?
Git is a distributed version control system .
Git is a distributed version control system .
HELLOWorld889594
?
git2.ppt
git2.ppt
ssusered2ec2
?
Getting Started with Git: A Primer for SVN and TFS Users
Getting Started with Git: A Primer for SVN and TFS Users
Noam Kfir
?
Learning Basic GIT Cmd
Learning Basic GIT Cmd
srinathcox
?
Version Control with Git
Version Control with Git
Sahil Agarwal
?
Collaborative development with Git | Workshop
Collaborative development with Git | Workshop
Anuchit Chalothorn
?
Introduction to Git and Github - Google Developer Student Clubs CET, Trivandrum
Introduction to Git and Github - Google Developer Student Clubs CET, Trivandrum
AbhijitNarayan2
?
GIT & Github introduction for beginners
GIT & Github introduction for beginners
riteshsingh3651
?
Introduction to GitHub, Open Source and Tech Article
Introduction to GitHub, Open Source and Tech Article
PRIYATHAMDARISI
?
Git is a distributed version control system .
Git is a distributed version control system .
HELLOWorld889594
?
Ad

More from Bhawna Tuteja (6)

Basics Of Python Programming
Basics Of Python Programming
Bhawna Tuteja
?
The Power Of Full Engagement
The Power Of Full Engagement
Bhawna Tuteja
?
Six sigma
Six sigma
Bhawna Tuteja
?
Lean fundamentals
Lean fundamentals
Bhawna Tuteja
?
Coding Best Practices For Memory Management
Coding Best Practices For Memory Management
Bhawna Tuteja
?
How google-tests-software
How google-tests-software
Bhawna Tuteja
?
Basics Of Python Programming
Basics Of Python Programming
Bhawna Tuteja
?
The Power Of Full Engagement
The Power Of Full Engagement
Bhawna Tuteja
?
Coding Best Practices For Memory Management
Coding Best Practices For Memory Management
Bhawna Tuteja
?
How google-tests-software
How google-tests-software
Bhawna Tuteja
?
Ad

Recently uploaded (20)

rosoft PowcgnggerPoint Presentation.pptx
rosoft PowcgnggerPoint Presentation.pptx
sirbabu778
?
Common Pitfalls in Magento to Shopify Migration and How to Avoid Them.pdf
Common Pitfalls in Magento to Shopify Migration and How to Avoid Them.pdf
CartCoders
?
ChatGPT A.I. Powered Chatbot and Popularization.pdf
ChatGPT A.I. Powered Chatbot and Popularization.pdf
StanleySamson1
?
cybercrime investigation and digital forensics
cybercrime investigation and digital forensics
goverdhankumar137300
?
NOC Services for maintaining network as MSA.ppt
NOC Services for maintaining network as MSA.ppt
ankurnagar22
?
Internet & Protocols : A Blueprint of the Internet System
Internet & Protocols : A Blueprint of the Internet System
cpnabil59
?
DDos Mitigation Strategie, presented at bdNOG 19
DDos Mitigation Strategie, presented at bdNOG 19
APNIC
?
AWS Basics for non technical people.pptx
AWS Basics for non technical people.pptx
sanjeevkumar123577
?
SAP_S4HANA_ChatGPT_Integration_Presentation.pptx
SAP_S4HANA_ChatGPT_Integration_Presentation.pptx
vemulavenu484
?
CBUSDAW - Ash Lewis - Reducing LLM Hallucinations
CBUSDAW - Ash Lewis - Reducing LLM Hallucinations
Jason Packer
?
最新版美国威斯康星大学绿湾分校毕业证(鲍奥骋叠毕业证书)原版定制
最新版美国威斯康星大学绿湾分校毕业证(鲍奥骋叠毕业证书)原版定制
Taqyea
?
LpQuantueer rtwrt 1e erere errerqer m.ppt
LpQuantueer rtwrt 1e erere errerqer m.ppt
cyberesearchprof
?
Topic 1 Foundational IT Infrastructure_.pptx
Topic 1 Foundational IT Infrastructure_.pptx
oneillp100
?
Lecture 3.1 Analysing the Global Business Environment .pptx
Lecture 3.1 Analysing the Global Business Environment .pptx
shofalbsb
?
Unlocking Business Growth Through Targeted Social Engagement
Unlocking Business Growth Through Targeted Social Engagement
Digital Guider
?
Timeline Infographics Para utiliza??o diária
Timeline Infographics Para utiliza??o diária
meslellis
?
IAREUOUSTPIDWHY$)CHARACTERARERWUEEJJSKWNSND
IAREUOUSTPIDWHY$)CHARACTERARERWUEEJJSKWNSND
notgachabite123
?
In order to install and use the device software, your computer must meet the ...
In order to install and use the device software, your computer must meet the ...
raguclc
?
Dark Web Presentation - 1.pdf about internet which will help you to get to kn...
Dark Web Presentation - 1.pdf about internet which will help you to get to kn...
ragnaralpha7199
?
SAP_S4HANA_eCommerce_Integration_Presentation.pptx
SAP_S4HANA_eCommerce_Integration_Presentation.pptx
vemulavenu484
?
rosoft PowcgnggerPoint Presentation.pptx
rosoft PowcgnggerPoint Presentation.pptx
sirbabu778
?
Common Pitfalls in Magento to Shopify Migration and How to Avoid Them.pdf
Common Pitfalls in Magento to Shopify Migration and How to Avoid Them.pdf
CartCoders
?
ChatGPT A.I. Powered Chatbot and Popularization.pdf
ChatGPT A.I. Powered Chatbot and Popularization.pdf
StanleySamson1
?
cybercrime investigation and digital forensics
cybercrime investigation and digital forensics
goverdhankumar137300
?
NOC Services for maintaining network as MSA.ppt
NOC Services for maintaining network as MSA.ppt
ankurnagar22
?
Internet & Protocols : A Blueprint of the Internet System
Internet & Protocols : A Blueprint of the Internet System
cpnabil59
?
DDos Mitigation Strategie, presented at bdNOG 19
DDos Mitigation Strategie, presented at bdNOG 19
APNIC
?
AWS Basics for non technical people.pptx
AWS Basics for non technical people.pptx
sanjeevkumar123577
?
SAP_S4HANA_ChatGPT_Integration_Presentation.pptx
SAP_S4HANA_ChatGPT_Integration_Presentation.pptx
vemulavenu484
?
CBUSDAW - Ash Lewis - Reducing LLM Hallucinations
CBUSDAW - Ash Lewis - Reducing LLM Hallucinations
Jason Packer
?
最新版美国威斯康星大学绿湾分校毕业证(鲍奥骋叠毕业证书)原版定制
最新版美国威斯康星大学绿湾分校毕业证(鲍奥骋叠毕业证书)原版定制
Taqyea
?
LpQuantueer rtwrt 1e erere errerqer m.ppt
LpQuantueer rtwrt 1e erere errerqer m.ppt
cyberesearchprof
?
Topic 1 Foundational IT Infrastructure_.pptx
Topic 1 Foundational IT Infrastructure_.pptx
oneillp100
?
Lecture 3.1 Analysing the Global Business Environment .pptx
Lecture 3.1 Analysing the Global Business Environment .pptx
shofalbsb
?
Unlocking Business Growth Through Targeted Social Engagement
Unlocking Business Growth Through Targeted Social Engagement
Digital Guider
?
Timeline Infographics Para utiliza??o diária
Timeline Infographics Para utiliza??o diária
meslellis
?
IAREUOUSTPIDWHY$)CHARACTERARERWUEEJJSKWNSND
IAREUOUSTPIDWHY$)CHARACTERARERWUEEJJSKWNSND
notgachabite123
?
In order to install and use the device software, your computer must meet the ...
In order to install and use the device software, your computer must meet the ...
raguclc
?
Dark Web Presentation - 1.pdf about internet which will help you to get to kn...
Dark Web Presentation - 1.pdf about internet which will help you to get to kn...
ragnaralpha7199
?
SAP_S4HANA_eCommerce_Integration_Presentation.pptx
SAP_S4HANA_eCommerce_Integration_Presentation.pptx
vemulavenu484
?

Git-Basics

  • 2. GIT GIT is one of the distributed version control systems that helps in ? Tracking code revision history ? Sharing codebase with collaborator ? Merging collaborators code with your code
  • 3. GIT: ADVANTAGES ? Performance: In GIT Code changes can be easily committed, compared and merged. This is because GIT is object based and object formats of GIT repository use several combinations of delta encoding to store metadata objects and directory contents. ? Security: GIT maintains the integrity of source code. File contents, as well as the relationship between files/directories, are secured via an algorithm which protects the code and code history against accidental damage. ? Flexibility: GIT is uniquely designed to support tagging and branching operations and store each activity carried out by the user as an integral part of “change” history. ? Open Source: GIT is a widely used open source version control with acceptance for more than 10 years. It is a widely-accepted system owing to its universally accepted usability and performance standards.
  • 4. GIT: DISADVANTAGES × For doing a small operation(s), a lot of commands are needed in GIT. × For Binary file like images, on-text files GIT becomes slow. × Bad command line syntax which is arbitrary and inconsistent. × For a beginner, it’s a steep learning curve to learn so many commands and it’s parameters.
  • 5. GIT: COMMANDS ? Init: Used to initialize a git repository from an existing directory of files $ git init ? Clone: Used to get a copy of the project into your local machine $ git clone <githuburl> ? Status: Used to view the status and changes of the directory on which you are working on and staging area. $ git status
  • 6. GIT: COMMANDS ? Add: Used to add files and directories to git staging areas before you can commit them. $ git add my_new_file.txt ? Commit: Used to record a snapshot of git’s staging area $ git commit -m “Add three files“ ? Reset: Used to undo all changes and commits $ git reset –soft HEAD^
  • 7. GIT: COMMANDS ? Pull: Used to fetch files from remote repo and try to merge with your current branch $ git pull ? Push: Used to push new branches and data in the staging area to the remote repo $ git push -u origin master ? Branch: Used to create, manage and list branches $ git branch ? Checkout: Used to switch from one branch to another branch $ git checkout user-profile ? Merge: Used to merge a branch into your current branch $ git merge <branchname> ? Log:Used to show commit history of your current branch