SlideShare une entreprise Scribd logo
1  sur  64
Télécharger pour lire hors ligne
Git It!
 Michele Mattioni
mattioni@ebi.ac.uk
    @mattions
<1>
My ideal version control system
●   Fast
●   Flexible
●   Offline
●   Smart
CVS/SVN
●   CVS:
    –   I never used CVS. I'm too young.
●   SVN:
    –   I can't commit locally
    –   I can't branch as I wish
    –   The Merging just doesn't work.
    –   All the operation are on-line. (No connection no
        cookies)
Bazaar
●   Good things:
    –   No network needed
    –   Really cool way to export your code in a tarball
●   Problems:
    –   SVN interface didn't work properly
    –   Branching and merging is ok but not as fast as git.
What is Git?




Git is an opensource distributed verson control
        system which makes you happy.
Hey, but I work alone!
●   Do you develop in linear fashon?



●   Do you usually make a massive commit and
    then you can't track what you had really
    changed?
Or... I have just a bunch of files
●   Don't you change them quite often?
●   Don't you need to keep track of what is going
    on?
●   ...
</1>
<2>
Different Way of thinking:
      Delta Storage
Git It
Git It
Git It
Git It
Git It
Git It
Git It
Git It
Git It
Git It
Git It
Git It
Git It
Local Rules:
        With No Network you can:
●   Performing a diff
●   Viewing file history
●   Committing changes
●   Merging branches
●   Obtaining any other revision of a file
●   Switching branches
Git It
Git It
Git It
Git It
Non Linear Development:
     Try your ideas
Freedom!!!!
Git It
Git It
Git It
Git It
Git It
Git It
Git It
You can move around a lot of
  branches and try different things

$ git   checkout -b feature_x
#hack   #hack
$ git   commit -am ”Adding new feature_x”
$ git   checkout master
$ git   merge feature_x


                It's fast
           You retain control
</2>
<3>
Basic use:


   git init – Init a new repository

git add file1-- Add file1 to the repo

git commit -m ”My first initial
        commit” -- Commit
Stage Idea
add a file you don't commit it but you
           put it in the index
If you just add a file this is staged but
             not committed
Commit: You commit everything that
         you have added
When you commit the file is
  recorded in the repo.
Scenario



     File1 -- Correct a typo

File2 -- introduced a new method

File3 -- Introduced new method
Control gives you flexibility


$ git add file1
$ git commit -m ”corrected a typo.”


$ git add file2 file3
$ git commit -m ”Introduced the
 newfeature to land on the moon.”
Mantra: Small commit are good



Do a lot of commit and divide your change
            logically in small part.

 It will help you a lot when you will break
          everything (and you will...)
Git It
Git It
-a switch




git commit -am ”I commit all 3 files
             in one go.”
</3>
<4>
Working online


$ git push origin master
$ git pull origin master


Can be any branch

$ git push origin feature_x
github.com/edu
Github is just good
Easy docs for your project hosted
         automatically
Nice way to collaborate
</4>
Bonus info

#git branch
parse_git_branch() {
git branch 2> /dev/null | sed -e
 '/^[^*]/d' -e 's/* (.*)/(1)/'
}
#grey
PS1='[33[0;32m]u[33[1;32m]@
 [33[0;32m]h[33[00m]:
 [33[01;34m]W[33[1;30m]$
 (parse_git_branch)[33[00m]$ '
Results
Useful resources:


   Git    http://git-scm.com/
   Github http://github.com

   Nice guide http://rogerdudler.github.com/git-guide/

                                my profile https://github.com/mattions


Credits: Some of the slides were taken from Scott Chacon
                                https://github.com/schacon

Contenu connexe

Tendances

Run python from windows taskscheduler
Run python from windows taskschedulerRun python from windows taskscheduler
Run python from windows taskschedulerNorifumi Irie
 
Lcna 2012-example
Lcna 2012-exampleLcna 2012-example
Lcna 2012-exampleGluster.org
 
Gojko Adzic Cucumber
Gojko Adzic CucumberGojko Adzic Cucumber
Gojko Adzic CucumberSkills Matter
 
Automating JavaScript testing with Jasmine and Perl
Automating JavaScript testing with Jasmine and PerlAutomating JavaScript testing with Jasmine and Perl
Automating JavaScript testing with Jasmine and Perlnohuhu
 
Background processes and tasks in an async world
Background processes and tasks in an async worldBackground processes and tasks in an async world
Background processes and tasks in an async worldparticlebanana
 
What is version control software and why do you need it?
What is version control software and why do you need it?What is version control software and why do you need it?
What is version control software and why do you need it?Leonid Mamchenkov
 
Improve the deployment process step by step
Improve the deployment process step by stepImprove the deployment process step by step
Improve the deployment process step by stepDaniel Fahlke
 
Git isthenewsexy
Git isthenewsexyGit isthenewsexy
Git isthenewsexyAilsa126
 
What has source control ever done for us?
What has source control ever done for us?What has source control ever done for us?
What has source control ever done for us?Andrew Grimm
 
Learning GitHub Part 1
Learning GitHub Part 1Learning GitHub Part 1
Learning GitHub Part 1Lynn Langit
 
Learning GitHub Part 4
Learning GitHub Part 4Learning GitHub Part 4
Learning GitHub Part 4Lynn Langit
 
Vinted life embetterment
Vinted life embettermentVinted life embetterment
Vinted life embettermentAgile Lietuva
 
Why on earth is git super awesome?
Why on earth is git super awesome?Why on earth is git super awesome?
Why on earth is git super awesome?Chris Brown
 
Continuous Integration for Pharo Smalltalk Part 2 (Smalltalk and Travis CI)
Continuous Integration for Pharo Smalltalk Part 2 (Smalltalk and Travis CI)Continuous Integration for Pharo Smalltalk Part 2 (Smalltalk and Travis CI)
Continuous Integration for Pharo Smalltalk Part 2 (Smalltalk and Travis CI)Sho Yoshida
 

Tendances (20)

Run python from windows taskscheduler
Run python from windows taskschedulerRun python from windows taskscheduler
Run python from windows taskscheduler
 
Lcna 2012-example
Lcna 2012-exampleLcna 2012-example
Lcna 2012-example
 
Gojko Adzic Cucumber
Gojko Adzic CucumberGojko Adzic Cucumber
Gojko Adzic Cucumber
 
Automating JavaScript testing with Jasmine and Perl
Automating JavaScript testing with Jasmine and PerlAutomating JavaScript testing with Jasmine and Perl
Automating JavaScript testing with Jasmine and Perl
 
Background processes and tasks in an async world
Background processes and tasks in an async worldBackground processes and tasks in an async world
Background processes and tasks in an async world
 
What is version control software and why do you need it?
What is version control software and why do you need it?What is version control software and why do you need it?
What is version control software and why do you need it?
 
Improve the deployment process step by step
Improve the deployment process step by stepImprove the deployment process step by step
Improve the deployment process step by step
 
Git isthenewsexy
Git isthenewsexyGit isthenewsexy
Git isthenewsexy
 
Git Introduction
Git IntroductionGit Introduction
Git Introduction
 
Leveragong splunk for finding needle in the Haystack
Leveragong splunk for finding needle in the HaystackLeveragong splunk for finding needle in the Haystack
Leveragong splunk for finding needle in the Haystack
 
What has source control ever done for us?
What has source control ever done for us?What has source control ever done for us?
What has source control ever done for us?
 
Git Tutorial
Git TutorialGit Tutorial
Git Tutorial
 
Learning GitHub Part 1
Learning GitHub Part 1Learning GitHub Part 1
Learning GitHub Part 1
 
Learning GitHub Part 4
Learning GitHub Part 4Learning GitHub Part 4
Learning GitHub Part 4
 
Vinted life embetterment
Vinted life embettermentVinted life embetterment
Vinted life embetterment
 
Why on earth is git super awesome?
Why on earth is git super awesome?Why on earth is git super awesome?
Why on earth is git super awesome?
 
Ratpack JVM_MX Meetup February 2016
Ratpack JVM_MX Meetup February 2016Ratpack JVM_MX Meetup February 2016
Ratpack JVM_MX Meetup February 2016
 
Git Heaven with Wakanda
Git Heaven with WakandaGit Heaven with Wakanda
Git Heaven with Wakanda
 
Process file one after another
Process file one after anotherProcess file one after another
Process file one after another
 
Continuous Integration for Pharo Smalltalk Part 2 (Smalltalk and Travis CI)
Continuous Integration for Pharo Smalltalk Part 2 (Smalltalk and Travis CI)Continuous Integration for Pharo Smalltalk Part 2 (Smalltalk and Travis CI)
Continuous Integration for Pharo Smalltalk Part 2 (Smalltalk and Travis CI)
 

En vedette

Neuronvisio sumatra workflow
Neuronvisio sumatra workflowNeuronvisio sumatra workflow
Neuronvisio sumatra workflowMichele Mattioni
 
Hype vs. Reality: The AI Explainer
Hype vs. Reality: The AI ExplainerHype vs. Reality: The AI Explainer
Hype vs. Reality: The AI ExplainerLuminary Labs
 
Study: The Future of VR, AR and Self-Driving Cars
Study: The Future of VR, AR and Self-Driving CarsStudy: The Future of VR, AR and Self-Driving Cars
Study: The Future of VR, AR and Self-Driving CarsLinkedIn
 

En vedette (8)

Neuronvisio sumatra workflow
Neuronvisio sumatra workflowNeuronvisio sumatra workflow
Neuronvisio sumatra workflow
 
Sumatra and git
Sumatra and gitSumatra and git
Sumatra and git
 
Neuronvisio Intro
Neuronvisio IntroNeuronvisio Intro
Neuronvisio Intro
 
Django packages list
Django packages listDjango packages list
Django packages list
 
Neuronvisio codejam5
Neuronvisio codejam5Neuronvisio codejam5
Neuronvisio codejam5
 
Scipy, numpy and friends
Scipy, numpy and friendsScipy, numpy and friends
Scipy, numpy and friends
 
Hype vs. Reality: The AI Explainer
Hype vs. Reality: The AI ExplainerHype vs. Reality: The AI Explainer
Hype vs. Reality: The AI Explainer
 
Study: The Future of VR, AR and Self-Driving Cars
Study: The Future of VR, AR and Self-Driving CarsStudy: The Future of VR, AR and Self-Driving Cars
Study: The Future of VR, AR and Self-Driving Cars
 

Similaire à Git It

Luis atencio on_git
Luis atencio on_gitLuis atencio on_git
Luis atencio on_gitLuis Atencio
 
Source Code Management with Git
Source Code Management with GitSource Code Management with Git
Source Code Management with GitThings Lab
 
Git and GitHub
Git and GitHubGit and GitHub
Git and GitHub태환 김
 
Working with multiple git repositories
Working with multiple git repositoriesWorking with multiple git repositories
Working with multiple git repositoriesJulien Pivotto
 
Introduction to Git for Artists
Introduction to Git for ArtistsIntroduction to Git for Artists
Introduction to Git for ArtistsDavid Newbury
 
Beginner's Guide to Version Control with Git
Beginner's Guide to Version Control with GitBeginner's Guide to Version Control with Git
Beginner's Guide to Version Control with GitRobert Lee-Cann
 
The Fundamentals of Git
The Fundamentals of GitThe Fundamentals of Git
The Fundamentals of GitDivineOmega
 
Git_tutorial.pdf
Git_tutorial.pdfGit_tutorial.pdf
Git_tutorial.pdfAliaaTarek5
 
Git Merge, Resets and Branches
Git Merge, Resets and BranchesGit Merge, Resets and Branches
Git Merge, Resets and BranchesVictor Pudelski
 
Git Obstacle Course: Stop BASHing your head and break down the basics
Git Obstacle Course: Stop BASHing your head and break down the basicsGit Obstacle Course: Stop BASHing your head and break down the basics
Git Obstacle Course: Stop BASHing your head and break down the basicsChris Bohatka
 
Git with the flow
Git with the flowGit with the flow
Git with the flowDana White
 
Git 101: Force-sensitive to Jedi padawan
Git 101: Force-sensitive to Jedi padawanGit 101: Force-sensitive to Jedi padawan
Git 101: Force-sensitive to Jedi padawanJames Ford
 
The Basics of Open Source Collaboration With Git and GitHub
The Basics of Open Source Collaboration With Git and GitHubThe Basics of Open Source Collaboration With Git and GitHub
The Basics of Open Source Collaboration With Git and GitHubBigBlueHat
 

Similaire à Git It (20)

Luis atencio on_git
Luis atencio on_gitLuis atencio on_git
Luis atencio on_git
 
Source Code Management with Git
Source Code Management with GitSource Code Management with Git
Source Code Management with Git
 
3 Git
3 Git3 Git
3 Git
 
Git and GitHub
Git and GitHubGit and GitHub
Git and GitHub
 
Working with multiple git repositories
Working with multiple git repositoriesWorking with multiple git repositories
Working with multiple git repositories
 
Git github
Git githubGit github
Git github
 
Introduction to Git for Artists
Introduction to Git for ArtistsIntroduction to Git for Artists
Introduction to Git for Artists
 
Beginner's Guide to Version Control with Git
Beginner's Guide to Version Control with GitBeginner's Guide to Version Control with Git
Beginner's Guide to Version Control with Git
 
The Fundamentals of Git
The Fundamentals of GitThe Fundamentals of Git
The Fundamentals of Git
 
Git_tutorial.pdf
Git_tutorial.pdfGit_tutorial.pdf
Git_tutorial.pdf
 
Git Merge, Resets and Branches
Git Merge, Resets and BranchesGit Merge, Resets and Branches
Git Merge, Resets and Branches
 
Git Obstacle Course: Stop BASHing your head and break down the basics
Git Obstacle Course: Stop BASHing your head and break down the basicsGit Obstacle Course: Stop BASHing your head and break down the basics
Git Obstacle Course: Stop BASHing your head and break down the basics
 
Git with the flow
Git with the flowGit with the flow
Git with the flow
 
Techoalien git
Techoalien gitTechoalien git
Techoalien git
 
Techoalien git
Techoalien gitTechoalien git
Techoalien git
 
Techoalien git
Techoalien gitTechoalien git
Techoalien git
 
How to use git without rage
How to use git without rageHow to use git without rage
How to use git without rage
 
Git 101: Force-sensitive to Jedi padawan
Git 101: Force-sensitive to Jedi padawanGit 101: Force-sensitive to Jedi padawan
Git 101: Force-sensitive to Jedi padawan
 
The Basics of Open Source Collaboration With Git and GitHub
The Basics of Open Source Collaboration With Git and GitHubThe Basics of Open Source Collaboration With Git and GitHub
The Basics of Open Source Collaboration With Git and GitHub
 
Git
GitGit
Git
 

Dernier

Extra-120324-Visite-Entreprise-icare.pdf
Extra-120324-Visite-Entreprise-icare.pdfExtra-120324-Visite-Entreprise-icare.pdf
Extra-120324-Visite-Entreprise-icare.pdfInfopole1
 
Q4 2023 Quarterly Investor Presentation - FINAL - v1.pdf
Q4 2023 Quarterly Investor Presentation - FINAL - v1.pdfQ4 2023 Quarterly Investor Presentation - FINAL - v1.pdf
Q4 2023 Quarterly Investor Presentation - FINAL - v1.pdfTejal81
 
UiPath Studio Web workshop series - Day 1
UiPath Studio Web workshop series  - Day 1UiPath Studio Web workshop series  - Day 1
UiPath Studio Web workshop series - Day 1DianaGray10
 
UiPath Studio Web workshop Series - Day 3
UiPath Studio Web workshop Series - Day 3UiPath Studio Web workshop Series - Day 3
UiPath Studio Web workshop Series - Day 3DianaGray10
 
AI Workshops at Computers In Libraries 2024
AI Workshops at Computers In Libraries 2024AI Workshops at Computers In Libraries 2024
AI Workshops at Computers In Libraries 2024Brian Pichman
 
Explore the UiPath Community and ways you can benefit on your journey to auto...
Explore the UiPath Community and ways you can benefit on your journey to auto...Explore the UiPath Community and ways you can benefit on your journey to auto...
Explore the UiPath Community and ways you can benefit on your journey to auto...DianaGray10
 
UiPath Studio Web workshop series - Day 2
UiPath Studio Web workshop series - Day 2UiPath Studio Web workshop series - Day 2
UiPath Studio Web workshop series - Day 2DianaGray10
 
Trailblazer Community - Flows Workshop (Session 2)
Trailblazer Community - Flows Workshop (Session 2)Trailblazer Community - Flows Workshop (Session 2)
Trailblazer Community - Flows Workshop (Session 2)Muhammad Tiham Siddiqui
 
The Importance of Indoor Air Quality (English)
The Importance of Indoor Air Quality (English)The Importance of Indoor Air Quality (English)
The Importance of Indoor Air Quality (English)IES VE
 
LF Energy Webinar - Unveiling OpenEEMeter 4.0
LF Energy Webinar - Unveiling OpenEEMeter 4.0LF Energy Webinar - Unveiling OpenEEMeter 4.0
LF Energy Webinar - Unveiling OpenEEMeter 4.0DanBrown980551
 
Outage Analysis: March 5th/6th 2024 Meta, Comcast, and LinkedIn
Outage Analysis: March 5th/6th 2024 Meta, Comcast, and LinkedInOutage Analysis: March 5th/6th 2024 Meta, Comcast, and LinkedIn
Outage Analysis: March 5th/6th 2024 Meta, Comcast, and LinkedInThousandEyes
 
TrustArc Webinar - How to Live in a Post Third-Party Cookie World
TrustArc Webinar - How to Live in a Post Third-Party Cookie WorldTrustArc Webinar - How to Live in a Post Third-Party Cookie World
TrustArc Webinar - How to Live in a Post Third-Party Cookie WorldTrustArc
 
IT Service Management (ITSM) Best Practices for Advanced Computing
IT Service Management (ITSM) Best Practices for Advanced ComputingIT Service Management (ITSM) Best Practices for Advanced Computing
IT Service Management (ITSM) Best Practices for Advanced ComputingMAGNIntelligence
 
Graphene Quantum Dots-Based Composites for Biomedical Applications
Graphene Quantum Dots-Based Composites for  Biomedical ApplicationsGraphene Quantum Dots-Based Composites for  Biomedical Applications
Graphene Quantum Dots-Based Composites for Biomedical Applicationsnooralam814309
 
My key hands-on projects in Quantum, and QAI
My key hands-on projects in Quantum, and QAIMy key hands-on projects in Quantum, and QAI
My key hands-on projects in Quantum, and QAIVijayananda Mohire
 
Flow Control | Block Size | ST Min | First Frame
Flow Control | Block Size | ST Min | First FrameFlow Control | Block Size | ST Min | First Frame
Flow Control | Block Size | ST Min | First FrameKapil Thakar
 
Top 10 Squarespace Development Companies
Top 10 Squarespace Development CompaniesTop 10 Squarespace Development Companies
Top 10 Squarespace Development CompaniesTopCSSGallery
 
2024.03.12 Cost drivers of cultivated meat production.pdf
2024.03.12 Cost drivers of cultivated meat production.pdf2024.03.12 Cost drivers of cultivated meat production.pdf
2024.03.12 Cost drivers of cultivated meat production.pdfThe Good Food Institute
 
Introduction to RAG (Retrieval Augmented Generation) and its application
Introduction to RAG (Retrieval Augmented Generation) and its applicationIntroduction to RAG (Retrieval Augmented Generation) and its application
Introduction to RAG (Retrieval Augmented Generation) and its applicationKnoldus Inc.
 
From the origin to the future of Open Source model and business
From the origin to the future of  Open Source model and businessFrom the origin to the future of  Open Source model and business
From the origin to the future of Open Source model and businessFrancesco Corti
 

Dernier (20)

Extra-120324-Visite-Entreprise-icare.pdf
Extra-120324-Visite-Entreprise-icare.pdfExtra-120324-Visite-Entreprise-icare.pdf
Extra-120324-Visite-Entreprise-icare.pdf
 
Q4 2023 Quarterly Investor Presentation - FINAL - v1.pdf
Q4 2023 Quarterly Investor Presentation - FINAL - v1.pdfQ4 2023 Quarterly Investor Presentation - FINAL - v1.pdf
Q4 2023 Quarterly Investor Presentation - FINAL - v1.pdf
 
UiPath Studio Web workshop series - Day 1
UiPath Studio Web workshop series  - Day 1UiPath Studio Web workshop series  - Day 1
UiPath Studio Web workshop series - Day 1
 
UiPath Studio Web workshop Series - Day 3
UiPath Studio Web workshop Series - Day 3UiPath Studio Web workshop Series - Day 3
UiPath Studio Web workshop Series - Day 3
 
AI Workshops at Computers In Libraries 2024
AI Workshops at Computers In Libraries 2024AI Workshops at Computers In Libraries 2024
AI Workshops at Computers In Libraries 2024
 
Explore the UiPath Community and ways you can benefit on your journey to auto...
Explore the UiPath Community and ways you can benefit on your journey to auto...Explore the UiPath Community and ways you can benefit on your journey to auto...
Explore the UiPath Community and ways you can benefit on your journey to auto...
 
UiPath Studio Web workshop series - Day 2
UiPath Studio Web workshop series - Day 2UiPath Studio Web workshop series - Day 2
UiPath Studio Web workshop series - Day 2
 
Trailblazer Community - Flows Workshop (Session 2)
Trailblazer Community - Flows Workshop (Session 2)Trailblazer Community - Flows Workshop (Session 2)
Trailblazer Community - Flows Workshop (Session 2)
 
The Importance of Indoor Air Quality (English)
The Importance of Indoor Air Quality (English)The Importance of Indoor Air Quality (English)
The Importance of Indoor Air Quality (English)
 
LF Energy Webinar - Unveiling OpenEEMeter 4.0
LF Energy Webinar - Unveiling OpenEEMeter 4.0LF Energy Webinar - Unveiling OpenEEMeter 4.0
LF Energy Webinar - Unveiling OpenEEMeter 4.0
 
Outage Analysis: March 5th/6th 2024 Meta, Comcast, and LinkedIn
Outage Analysis: March 5th/6th 2024 Meta, Comcast, and LinkedInOutage Analysis: March 5th/6th 2024 Meta, Comcast, and LinkedIn
Outage Analysis: March 5th/6th 2024 Meta, Comcast, and LinkedIn
 
TrustArc Webinar - How to Live in a Post Third-Party Cookie World
TrustArc Webinar - How to Live in a Post Third-Party Cookie WorldTrustArc Webinar - How to Live in a Post Third-Party Cookie World
TrustArc Webinar - How to Live in a Post Third-Party Cookie World
 
IT Service Management (ITSM) Best Practices for Advanced Computing
IT Service Management (ITSM) Best Practices for Advanced ComputingIT Service Management (ITSM) Best Practices for Advanced Computing
IT Service Management (ITSM) Best Practices for Advanced Computing
 
Graphene Quantum Dots-Based Composites for Biomedical Applications
Graphene Quantum Dots-Based Composites for  Biomedical ApplicationsGraphene Quantum Dots-Based Composites for  Biomedical Applications
Graphene Quantum Dots-Based Composites for Biomedical Applications
 
My key hands-on projects in Quantum, and QAI
My key hands-on projects in Quantum, and QAIMy key hands-on projects in Quantum, and QAI
My key hands-on projects in Quantum, and QAI
 
Flow Control | Block Size | ST Min | First Frame
Flow Control | Block Size | ST Min | First FrameFlow Control | Block Size | ST Min | First Frame
Flow Control | Block Size | ST Min | First Frame
 
Top 10 Squarespace Development Companies
Top 10 Squarespace Development CompaniesTop 10 Squarespace Development Companies
Top 10 Squarespace Development Companies
 
2024.03.12 Cost drivers of cultivated meat production.pdf
2024.03.12 Cost drivers of cultivated meat production.pdf2024.03.12 Cost drivers of cultivated meat production.pdf
2024.03.12 Cost drivers of cultivated meat production.pdf
 
Introduction to RAG (Retrieval Augmented Generation) and its application
Introduction to RAG (Retrieval Augmented Generation) and its applicationIntroduction to RAG (Retrieval Augmented Generation) and its application
Introduction to RAG (Retrieval Augmented Generation) and its application
 
From the origin to the future of Open Source model and business
From the origin to the future of  Open Source model and businessFrom the origin to the future of  Open Source model and business
From the origin to the future of Open Source model and business
 

Git It

  • 1. Git It! Michele Mattioni mattioni@ebi.ac.uk @mattions
  • 2. <1>
  • 3. My ideal version control system ● Fast ● Flexible ● Offline ● Smart
  • 4. CVS/SVN ● CVS: – I never used CVS. I'm too young. ● SVN: – I can't commit locally – I can't branch as I wish – The Merging just doesn't work. – All the operation are on-line. (No connection no cookies)
  • 5. Bazaar ● Good things: – No network needed – Really cool way to export your code in a tarball ● Problems: – SVN interface didn't work properly – Branching and merging is ok but not as fast as git.
  • 6. What is Git? Git is an opensource distributed verson control system which makes you happy.
  • 7. Hey, but I work alone! ● Do you develop in linear fashon? ● Do you usually make a massive commit and then you can't track what you had really changed?
  • 8. Or... I have just a bunch of files ● Don't you change them quite often? ● Don't you need to keep track of what is going on? ● ...
  • 10. <2>
  • 11. Different Way of thinking: Delta Storage
  • 25. Local Rules: With No Network you can: ● Performing a diff ● Viewing file history ● Committing changes ● Merging branches ● Obtaining any other revision of a file ● Switching branches
  • 30. Non Linear Development: Try your ideas
  • 39. You can move around a lot of branches and try different things $ git checkout -b feature_x #hack #hack $ git commit -am ”Adding new feature_x” $ git checkout master $ git merge feature_x It's fast You retain control
  • 40. </2>
  • 41. <3>
  • 42. Basic use: git init – Init a new repository git add file1-- Add file1 to the repo git commit -m ”My first initial commit” -- Commit
  • 44. add a file you don't commit it but you put it in the index
  • 45. If you just add a file this is staged but not committed
  • 46. Commit: You commit everything that you have added
  • 47. When you commit the file is recorded in the repo.
  • 48. Scenario File1 -- Correct a typo File2 -- introduced a new method File3 -- Introduced new method
  • 49. Control gives you flexibility $ git add file1 $ git commit -m ”corrected a typo.” $ git add file2 file3 $ git commit -m ”Introduced the newfeature to land on the moon.”
  • 50. Mantra: Small commit are good Do a lot of commit and divide your change logically in small part. It will help you a lot when you will break everything (and you will...)
  • 53. -a switch git commit -am ”I commit all 3 files in one go.”
  • 54. </3>
  • 55. <4>
  • 56. Working online $ git push origin master $ git pull origin master Can be any branch $ git push origin feature_x
  • 59. Easy docs for your project hosted automatically
  • 60. Nice way to collaborate
  • 61. </4>
  • 62. Bonus info #git branch parse_git_branch() { git branch 2> /dev/null | sed -e '/^[^*]/d' -e 's/* (.*)/(1)/' } #grey PS1='[33[0;32m]u[33[1;32m]@ [33[0;32m]h[33[00m]: [33[01;34m]W[33[1;30m]$ (parse_git_branch)[33[00m]$ '
  • 64. Useful resources: Git http://git-scm.com/ Github http://github.com Nice guide http://rogerdudler.github.com/git-guide/ my profile https://github.com/mattions Credits: Some of the slides were taken from Scott Chacon https://github.com/schacon