SlideShare une entreprise Scribd logo
1  sur  21
Télécharger pour lire hors ligne
Git
An intro to Git Source Control Management
Say what?
Source Control Management
like SVN, CVS,.. but better!
Linus Throvalds (april 2005)
Linux Kernel
Junio Hamano (july 2005)
a stupid person!
Ok, but why?
Offline
Distributed
Branching
Because it’s fucking fast, that’s why!
How git works     Offline

  world




                local
How git works       Distributed

   server


                           local




            local          local
How git works                   Branching

                      feature            commit


master   commit                             merge
                      commit     commit



           feature   commit     commit
Repository

unstaged


    git add <files>


                           local                  remote
 staged
                        repository              repository
           git commit                git push
Our Workflow
git checkout -b cool_feature
do some fun code stuff, drink a mojito
git fetch master
git rebase origin/master
git checkout master
git merge cool_feature
Useful commands and files
             ‣ repository setup
git init
             ‣ add files to queue for next commit
git add
             ‣ commit queued files
git commit
             ‣ push commit(s) to remote repository
git push
             ‣ fetch changes from remote repository
git pull
             ‣ clone repository into a local directory
git clone


             ‣ ignore specific files by adding them here
.gitignore
Cool features
Uhm.. Okay...
Cool features                            stash
 do some cool stuff
 git stash
 fix an irritating bug
 git commit -a -m “Farewell, you bug!”
 git stash apply
 do some more cool stuff
Cool features                            rebase
    fetch changes from another branch



                            feature     commit 3


master    commit 1          commit 2        commit 4
Cool features                              rebase
    fetch changes from another branch

                                               1234
                                              commit 3
                                 feature


master    commit 1        commit 2         commit 4

                                                  124
Cool features                                  bisect
 Find the code change that introduced a bug


                            ‣ start bisect session
 git bisect start
                            ‣ mark current revision as bad
 git bisect bad
                            ‣ search a working revision
 git log
                            ‣ mark the working one as good
 git bisect good revision
                            ‣ bisect until you find the bug
 git bisect good/bad
Cool features                         cherry-pick
 Apply a change from another commit into current branch


                            ‣ search the right commit
 git log
                            ‣ checkout the branch you want
 git checkout branch
                            ‣ apply commit into branch
 git cherry-pick revision
GitNub
Git vs SVN
           Git                      SVN

      Distributed             Single Repository

       Branches                partial checkout

     Performance               Access Control

    Repository size        Shorter revision numbers
         Powerful,
                               more GUI tools
 little more complicated
git-svn
 using git local if you have a remote svn repository
   use git on your local machine
     staging
     seperate commits
     branches
   push your commits to your svn repository
Q&A
Useful resources
http://www.kernel.org/pub/software/scm/git/docs/
http://peepcode.com/products/git
https://github.com/
http://github.com/Caged/gitnub/tree/master
http://git.or.cz/gitwiki/GitSvnComparsion
About us


     Jeroen Jacobs & Jan De Poorter
     @jeroen_j & @defv
     Openminds

Contenu connexe

Tendances (20)

Git basic
Git basicGit basic
Git basic
 
Git presentation
Git presentationGit presentation
Git presentation
 
Introduction to Git for Artists
Introduction to Git for ArtistsIntroduction to Git for Artists
Introduction to Git for Artists
 
01 - Git vs SVN
01 - Git vs SVN01 - Git vs SVN
01 - Git vs SVN
 
Intro to git and git hub
Intro to git and git hubIntro to git and git hub
Intro to git and git hub
 
Basic Git
Basic GitBasic Git
Basic Git
 
Git - Basic Crash Course
Git - Basic Crash CourseGit - Basic Crash Course
Git - Basic Crash Course
 
Introduction to Git
Introduction to GitIntroduction to Git
Introduction to Git
 
GIT presentation
GIT presentationGIT presentation
GIT presentation
 
Git: basic to advanced
Git: basic to advancedGit: basic to advanced
Git: basic to advanced
 
A Practical Introduction to git
A Practical Introduction to gitA Practical Introduction to git
A Practical Introduction to git
 
Version Control History and Git Basics
Version Control History and Git BasicsVersion Control History and Git Basics
Version Control History and Git Basics
 
Git 101 for Beginners
Git 101 for Beginners Git 101 for Beginners
Git 101 for Beginners
 
Introduction git
Introduction gitIntroduction git
Introduction git
 
Introduction to Git
Introduction to GitIntroduction to Git
Introduction to Git
 
Git training v10
Git training v10Git training v10
Git training v10
 
Learn Git Basics
Learn Git BasicsLearn Git Basics
Learn Git Basics
 
Git commands
Git commandsGit commands
Git commands
 
Git vs svn
Git vs svnGit vs svn
Git vs svn
 
Git basics
Git basicsGit basics
Git basics
 

En vedette (7)

Git for uninitiated
Git for uninitiatedGit for uninitiated
Git for uninitiated
 
Something something rack
Something something rackSomething something rack
Something something rack
 
EDUC W200 PP
EDUC W200 PPEDUC W200 PP
EDUC W200 PP
 
Validation
ValidationValidation
Validation
 
Cucumber
CucumberCucumber
Cucumber
 
Testing
TestingTesting
Testing
 
Git in Eclipse
Git in EclipseGit in Eclipse
Git in Eclipse
 

Similaire à Git Source Control Management Intro

Similaire à Git Source Control Management Intro (20)

Git
GitGit
Git
 
Git Tech Talk
Git  Tech TalkGit  Tech Talk
Git Tech Talk
 
Git Started With Git
Git Started With GitGit Started With Git
Git Started With Git
 
Git basic stanley hsiao 2010_12_15
Git basic stanley hsiao 2010_12_15Git basic stanley hsiao 2010_12_15
Git basic stanley hsiao 2010_12_15
 
Session git
Session gitSession git
Session git
 
Wokshop de Git
Wokshop de Git Wokshop de Git
Wokshop de Git
 
Git: A Getting Started Presentation
Git: A Getting Started PresentationGit: A Getting Started Presentation
Git: A Getting Started Presentation
 
M.Mozūras - git
M.Mozūras - gitM.Mozūras - git
M.Mozūras - git
 
Git One Day Training Notes
Git One Day Training NotesGit One Day Training Notes
Git One Day Training Notes
 
Git
GitGit
Git
 
Source control management
Source control managementSource control management
Source control management
 
How to use git without rage
How to use git without rageHow to use git without rage
How to use git without rage
 
Introduction to Git
Introduction to GitIntroduction to Git
Introduction to Git
 
Git for-fun-and-productivity
Git for-fun-and-productivityGit for-fun-and-productivity
Git for-fun-and-productivity
 
Git cheat-sheets
Git cheat-sheetsGit cheat-sheets
Git cheat-sheets
 
Git
GitGit
Git
 
Working with Git
Working with GitWorking with Git
Working with Git
 
Git and git hub
Git and git hubGit and git hub
Git and git hub
 
Why You Should Be Using Git
Why You Should Be Using GitWhy You Should Be Using Git
Why You Should Be Using Git
 
How to Really Get Git
How to Really Get GitHow to Really Get Git
How to Really Get Git
 

Plus de joren de groof (8)

Git techtalk
Git techtalkGit techtalk
Git techtalk
 
Tatft
TatftTatft
Tatft
 
Rubyandrails
RubyandrailsRubyandrails
Rubyandrails
 
Rails Servers
Rails ServersRails Servers
Rails Servers
 
Radiant
RadiantRadiant
Radiant
 
Prawn
PrawnPrawn
Prawn
 
Nanoc
NanocNanoc
Nanoc
 
Mistakes
MistakesMistakes
Mistakes
 

Dernier

Use of FIDO in the Payments and Identity Landscape: FIDO Paris Seminar.pptx
Use of FIDO in the Payments and Identity Landscape: FIDO Paris Seminar.pptxUse of FIDO in the Payments and Identity Landscape: FIDO Paris Seminar.pptx
Use of FIDO in the Payments and Identity Landscape: FIDO Paris Seminar.pptxLoriGlavin3
 
What's New in Teams Calling, Meetings and Devices March 2024
What's New in Teams Calling, Meetings and Devices March 2024What's New in Teams Calling, Meetings and Devices March 2024
What's New in Teams Calling, Meetings and Devices March 2024Stephanie Beckett
 
SIP trunking in Janus @ Kamailio World 2024
SIP trunking in Janus @ Kamailio World 2024SIP trunking in Janus @ Kamailio World 2024
SIP trunking in Janus @ Kamailio World 2024Lorenzo Miniero
 
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024BookNet Canada
 
The State of Passkeys with FIDO Alliance.pptx
The State of Passkeys with FIDO Alliance.pptxThe State of Passkeys with FIDO Alliance.pptx
The State of Passkeys with FIDO Alliance.pptxLoriGlavin3
 
DevEX - reference for building teams, processes, and platforms
DevEX - reference for building teams, processes, and platformsDevEX - reference for building teams, processes, and platforms
DevEX - reference for building teams, processes, and platformsSergiu Bodiu
 
New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024BookNet Canada
 
Sample pptx for embedding into website for demo
Sample pptx for embedding into website for demoSample pptx for embedding into website for demo
Sample pptx for embedding into website for demoHarshalMandlekar2
 
Gen AI in Business - Global Trends Report 2024.pdf
Gen AI in Business - Global Trends Report 2024.pdfGen AI in Business - Global Trends Report 2024.pdf
Gen AI in Business - Global Trends Report 2024.pdfAddepto
 
Rise of the Machines: Known As Drones...
Rise of the Machines: Known As Drones...Rise of the Machines: Known As Drones...
Rise of the Machines: Known As Drones...Rick Flair
 
Nell’iperspazio con Rocket: il Framework Web di Rust!
Nell’iperspazio con Rocket: il Framework Web di Rust!Nell’iperspazio con Rocket: il Framework Web di Rust!
Nell’iperspazio con Rocket: il Framework Web di Rust!Commit University
 
Training state-of-the-art general text embedding
Training state-of-the-art general text embeddingTraining state-of-the-art general text embedding
Training state-of-the-art general text embeddingZilliz
 
Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024BookNet Canada
 
Digital Identity is Under Attack: FIDO Paris Seminar.pptx
Digital Identity is Under Attack: FIDO Paris Seminar.pptxDigital Identity is Under Attack: FIDO Paris Seminar.pptx
Digital Identity is Under Attack: FIDO Paris Seminar.pptxLoriGlavin3
 
Developer Data Modeling Mistakes: From Postgres to NoSQL
Developer Data Modeling Mistakes: From Postgres to NoSQLDeveloper Data Modeling Mistakes: From Postgres to NoSQL
Developer Data Modeling Mistakes: From Postgres to NoSQLScyllaDB
 
DevoxxFR 2024 Reproducible Builds with Apache Maven
DevoxxFR 2024 Reproducible Builds with Apache MavenDevoxxFR 2024 Reproducible Builds with Apache Maven
DevoxxFR 2024 Reproducible Builds with Apache MavenHervé Boutemy
 
SALESFORCE EDUCATION CLOUD | FEXLE SERVICES
SALESFORCE EDUCATION CLOUD | FEXLE SERVICESSALESFORCE EDUCATION CLOUD | FEXLE SERVICES
SALESFORCE EDUCATION CLOUD | FEXLE SERVICESmohitsingh558521
 
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024BookNet Canada
 
Dev Dives: Streamline document processing with UiPath Studio Web
Dev Dives: Streamline document processing with UiPath Studio WebDev Dives: Streamline document processing with UiPath Studio Web
Dev Dives: Streamline document processing with UiPath Studio WebUiPathCommunity
 
Merck Moving Beyond Passwords: FIDO Paris Seminar.pptx
Merck Moving Beyond Passwords: FIDO Paris Seminar.pptxMerck Moving Beyond Passwords: FIDO Paris Seminar.pptx
Merck Moving Beyond Passwords: FIDO Paris Seminar.pptxLoriGlavin3
 

Dernier (20)

Use of FIDO in the Payments and Identity Landscape: FIDO Paris Seminar.pptx
Use of FIDO in the Payments and Identity Landscape: FIDO Paris Seminar.pptxUse of FIDO in the Payments and Identity Landscape: FIDO Paris Seminar.pptx
Use of FIDO in the Payments and Identity Landscape: FIDO Paris Seminar.pptx
 
What's New in Teams Calling, Meetings and Devices March 2024
What's New in Teams Calling, Meetings and Devices March 2024What's New in Teams Calling, Meetings and Devices March 2024
What's New in Teams Calling, Meetings and Devices March 2024
 
SIP trunking in Janus @ Kamailio World 2024
SIP trunking in Janus @ Kamailio World 2024SIP trunking in Janus @ Kamailio World 2024
SIP trunking in Janus @ Kamailio World 2024
 
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
 
The State of Passkeys with FIDO Alliance.pptx
The State of Passkeys with FIDO Alliance.pptxThe State of Passkeys with FIDO Alliance.pptx
The State of Passkeys with FIDO Alliance.pptx
 
DevEX - reference for building teams, processes, and platforms
DevEX - reference for building teams, processes, and platformsDevEX - reference for building teams, processes, and platforms
DevEX - reference for building teams, processes, and platforms
 
New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
 
Sample pptx for embedding into website for demo
Sample pptx for embedding into website for demoSample pptx for embedding into website for demo
Sample pptx for embedding into website for demo
 
Gen AI in Business - Global Trends Report 2024.pdf
Gen AI in Business - Global Trends Report 2024.pdfGen AI in Business - Global Trends Report 2024.pdf
Gen AI in Business - Global Trends Report 2024.pdf
 
Rise of the Machines: Known As Drones...
Rise of the Machines: Known As Drones...Rise of the Machines: Known As Drones...
Rise of the Machines: Known As Drones...
 
Nell’iperspazio con Rocket: il Framework Web di Rust!
Nell’iperspazio con Rocket: il Framework Web di Rust!Nell’iperspazio con Rocket: il Framework Web di Rust!
Nell’iperspazio con Rocket: il Framework Web di Rust!
 
Training state-of-the-art general text embedding
Training state-of-the-art general text embeddingTraining state-of-the-art general text embedding
Training state-of-the-art general text embedding
 
Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
 
Digital Identity is Under Attack: FIDO Paris Seminar.pptx
Digital Identity is Under Attack: FIDO Paris Seminar.pptxDigital Identity is Under Attack: FIDO Paris Seminar.pptx
Digital Identity is Under Attack: FIDO Paris Seminar.pptx
 
Developer Data Modeling Mistakes: From Postgres to NoSQL
Developer Data Modeling Mistakes: From Postgres to NoSQLDeveloper Data Modeling Mistakes: From Postgres to NoSQL
Developer Data Modeling Mistakes: From Postgres to NoSQL
 
DevoxxFR 2024 Reproducible Builds with Apache Maven
DevoxxFR 2024 Reproducible Builds with Apache MavenDevoxxFR 2024 Reproducible Builds with Apache Maven
DevoxxFR 2024 Reproducible Builds with Apache Maven
 
SALESFORCE EDUCATION CLOUD | FEXLE SERVICES
SALESFORCE EDUCATION CLOUD | FEXLE SERVICESSALESFORCE EDUCATION CLOUD | FEXLE SERVICES
SALESFORCE EDUCATION CLOUD | FEXLE SERVICES
 
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
 
Dev Dives: Streamline document processing with UiPath Studio Web
Dev Dives: Streamline document processing with UiPath Studio WebDev Dives: Streamline document processing with UiPath Studio Web
Dev Dives: Streamline document processing with UiPath Studio Web
 
Merck Moving Beyond Passwords: FIDO Paris Seminar.pptx
Merck Moving Beyond Passwords: FIDO Paris Seminar.pptxMerck Moving Beyond Passwords: FIDO Paris Seminar.pptx
Merck Moving Beyond Passwords: FIDO Paris Seminar.pptx
 

Git Source Control Management Intro