intro to gitp.3 what is git intro to git started in 2005 created by linus torvalds to aid...
TRANSCRIPT
![Page 1: Intro to Gitp.3 What is Git Intro to Git Started in 2005 Created by Linus Torvalds to aid development of the Linux Kernel Primarily used for source code management in software development](https://reader034.vdocument.in/reader034/viewer/2022042808/5f8600ab7b14ef15205e9ba4/html5/thumbnails/1.jpg)
GitandGerritForWorkingWithandOnQtQtWorldSummit2019
PresentedbyKevinFunk
![Page 2: Intro to Gitp.3 What is Git Intro to Git Started in 2005 Created by Linus Torvalds to aid development of the Linux Kernel Primarily used for source code management in software development](https://reader034.vdocument.in/reader034/viewer/2022042808/5f8600ab7b14ef15205e9ba4/html5/thumbnails/2.jpg)
p.2
IntrotoGit
IntrotoGit
IntrotoGit
IntrotoGerritforQt
![Page 3: Intro to Gitp.3 What is Git Intro to Git Started in 2005 Created by Linus Torvalds to aid development of the Linux Kernel Primarily used for source code management in software development](https://reader034.vdocument.in/reader034/viewer/2022042808/5f8600ab7b14ef15205e9ba4/html5/thumbnails/3.jpg)
p.3
WhatisGit
IntrotoGit
Startedin2005
CreatedbyLinusTorvaldstoaiddevelopmentoftheLinuxKernel
Primarilyusedforsourcecodemanagementinsoftwaredevelopment
Availableonallmajorplatforms:Linux,Windows,macOS
FreeandOpenSource
![Page 4: Intro to Gitp.3 What is Git Intro to Git Started in 2005 Created by Linus Torvalds to aid development of the Linux Kernel Primarily used for source code management in software development](https://reader034.vdocument.in/reader034/viewer/2022042808/5f8600ab7b14ef15205e9ba4/html5/thumbnails/4.jpg)
p.4
Keyfeatures
IntrotoGit
Instantbranchingandmerging
Smallandfast
Fullydistributed
Dataassurance/integrity
Handleshugeprojectswithease(hint:LinuxKernel)
Uniquefeature:Stagingarea
![Page 5: Intro to Gitp.3 What is Git Intro to Git Started in 2005 Created by Linus Torvalds to aid development of the Linux Kernel Primarily used for source code management in software development](https://reader034.vdocument.in/reader034/viewer/2022042808/5f8600ab7b14ef15205e9ba4/html5/thumbnails/5.jpg)
p.5
FromSubversiontoGit
IntrotoGit
Source:git-tower.com
![Page 6: Intro to Gitp.3 What is Git Intro to Git Started in 2005 Created by Linus Torvalds to aid development of the Linux Kernel Primarily used for source code management in software development](https://reader034.vdocument.in/reader034/viewer/2022042808/5f8600ab7b14ef15205e9ba4/html5/thumbnails/6.jpg)
p.6
InteractingwithGit
IntrotoGit
Mostpowerful:gitviacommand-lineButalsohasthemost-steeplearningcurve
Graphical(standalone):gitk(cross-platform;'default')GitExtensions(cross-platform;free,GPL)SourceTree(Windows,macOS;free,proprietary)manyothers!(https://git-scm.com/downloads/guis/)
Graphical(integrated):GitpluginsformostIntegratedDevelopmentEnvironments
![Page 7: Intro to Gitp.3 What is Git Intro to Git Started in 2005 Created by Linus Torvalds to aid development of the Linux Kernel Primarily used for source code management in software development](https://reader034.vdocument.in/reader034/viewer/2022042808/5f8600ab7b14ef15205e9ba4/html5/thumbnails/7.jpg)
p.7
InteractingwithGit(cont'd)
IntrotoGit
Notethatinthisguidewe'llfocusoninteractionwiththecommand-lineclient
![Page 8: Intro to Gitp.3 What is Git Intro to Git Started in 2005 Created by Linus Torvalds to aid development of the Linux Kernel Primarily used for source code management in software development](https://reader034.vdocument.in/reader034/viewer/2022042808/5f8600ab7b14ef15205e9ba4/html5/thumbnails/8.jpg)
p.8
GettingHelp
IntrotoGit
Referencemanual:https://git-scm.com/doc
Orforamorebriefversion:mangit,ORgit--help(equivalenttoabove),ORgitCOMMAND--help
![Page 9: Intro to Gitp.3 What is Git Intro to Git Started in 2005 Created by Linus Torvalds to aid development of the Linux Kernel Primarily used for source code management in software development](https://reader034.vdocument.in/reader034/viewer/2022042808/5f8600ab7b14ef15205e9ba4/html5/thumbnails/9.jpg)
p.8
GettingHelp
IntrotoGit
Referencemanual:https://git-scm.com/doc
Orforamorebriefversion:mangit,ORgit--help(equivalenttoabove),ORgitCOMMAND--help
Anotherindispensablesourceforhelp:stackoverflow.com
![Page 10: Intro to Gitp.3 What is Git Intro to Git Started in 2005 Created by Linus Torvalds to aid development of the Linux Kernel Primarily used for source code management in software development](https://reader034.vdocument.in/reader034/viewer/2022042808/5f8600ab7b14ef15205e9ba4/html5/thumbnails/10.jpg)
p.9
FirstThingsFirst
IntrotoGit
TellGitwhoyouare:gitconfig--globaluser.name"YourName"gitconfig--globaluser.email"[email protected]"
Globalsettingsfile:~/.gitconfig
Projectsettingsfile:$PROJECTDIR/.git/config
WindowsusersGitlooksforthe.gitconfigfileinthe%HOME%directory:C:\Users\%USER%formostpeople
![Page 11: Intro to Gitp.3 What is Git Intro to Git Started in 2005 Created by Linus Torvalds to aid development of the Linux Kernel Primarily used for source code management in software development](https://reader034.vdocument.in/reader034/viewer/2022042808/5f8600ab7b14ef15205e9ba4/html5/thumbnails/11.jpg)
p.10
USECASE:InitialCheck-out
IntrotoGit
Example(checkingoutfromaremotelocation):gitclonegit://code.qt.io/qt/qt5.git
Example(...andaspecificbranch):gitclonegit://code.qt.io/qt/qt5.git-b5.12
![Page 12: Intro to Gitp.3 What is Git Intro to Git Started in 2005 Created by Linus Torvalds to aid development of the Linux Kernel Primarily used for source code management in software development](https://reader034.vdocument.in/reader034/viewer/2022042808/5f8600ab7b14ef15205e9ba4/html5/thumbnails/12.jpg)
p.11
USECASE:Commit
IntrotoGit
Seeyourchanges:gitstatusORgitdiffORgitk
Markthefilesyouwanttocheckin:gitadd<files>
Checkinthemarkedfiles:gitcommitORgitcommit-m"checkinmessage"
Fetchlatestversionfromremoteserver:gitpull
Pushthechangestotheserver:gitpush
Youmaycommitallfilesusing-aoption:gitcommit-a
Demo
![Page 13: Intro to Gitp.3 What is Git Intro to Git Started in 2005 Created by Linus Torvalds to aid development of the Linux Kernel Primarily used for source code management in software development](https://reader034.vdocument.in/reader034/viewer/2022042808/5f8600ab7b14ef15205e9ba4/html5/thumbnails/13.jpg)
p.12
IntrotoGerritforQt
IntrotoGerritforQt
IntrotoGit
IntrotoGerritforQt
![Page 14: Intro to Gitp.3 What is Git Intro to Git Started in 2005 Created by Linus Torvalds to aid development of the Linux Kernel Primarily used for source code management in software development](https://reader034.vdocument.in/reader034/viewer/2022042808/5f8600ab7b14ef15205e9ba4/html5/thumbnails/14.jpg)
p.13
HowtouseGerritbyexampleofcontributingtoQt
IntrotoGerritforQt
Qt'sdevelopmentoccursintheopeninrepositoriesathttps://codereview.qt-project.org(aGerritcodereviewinstance).
Theyaremirroredread-onlyatcode.qt.io
TheQtprojectprovidesfreehostingtoprojectsrelatedtoQtwhichhavebeenincubatedandacceptedbythecommunity
CloningQt:gitclonegit://code.qt.io/qt/qt5.git
Seehttp://wiki.qt.io/Building_Qt_5_from_Gitforbuildinstructions
![Page 15: Intro to Gitp.3 What is Git Intro to Git Started in 2005 Created by Linus Torvalds to aid development of the Linux Kernel Primarily used for source code management in software development](https://reader034.vdocument.in/reader034/viewer/2022042808/5f8600ab7b14ef15205e9ba4/html5/thumbnails/15.jpg)
p.14
ContributingtoQtviaGerrit
IntrotoGerritforQt
PrerequisitesQtAccount(SSO)
https://login.qt.io/registerAccesstoGerrit
https://codereview.qt-project.org/AccesstoJIRA(forclosingbugs,etc.)
https://bugreports.qt.io/SignedContributorAgreement
CanbedoneinGerritMoreinfo:https://www.qt.io/legal-contribution-agreement-qt
![Page 16: Intro to Gitp.3 What is Git Intro to Git Started in 2005 Created by Linus Torvalds to aid development of the Linux Kernel Primarily used for source code management in software development](https://reader034.vdocument.in/reader034/viewer/2022042808/5f8600ab7b14ef15205e9ba4/html5/thumbnails/16.jpg)
p.15
ContributingtoQtviaGerrit(cont'd)
IntrotoGerritforQt
YoumightwanttosubmitapatchbacktoQt'srepositories.
TodothisyouneedtosignupforaGerritaccountathttps://codereview.qt-project.org/.
SetupforusingGerritonyourlocalclone.gitremoteaddgerritGERRIT_URL;...
Commitlocallyasusual.
Pushlocalcommitstogerrit.gitpushgerritHEAD:refs/for/5.9
orgitpushgerritHEAD:refs/for/dev
AremotehookfromGerritwillprintanURL.
OpentheresultingURL(s)andfollowthereviewprocedures.
![Page 17: Intro to Gitp.3 What is Git Intro to Git Started in 2005 Created by Linus Torvalds to aid development of the Linux Kernel Primarily used for source code management in software development](https://reader034.vdocument.in/reader034/viewer/2022042808/5f8600ab7b14ef15205e9ba4/html5/thumbnails/17.jpg)
p.16
GerritSetupforQtdevelopment
IntrotoGerritforQt
ConfigureSSH:1 Hostcodereview.qt-project.org2 Port294183 User
Addacommithook:scp-pcodereview.qt-project.org:hooks/commit-msg.git/hooks
Orcopyfromhttp://codereview.qt-project.org/tools/hooks/commit-msg
Addanew"remote"toyourclone:gitremoteaddgerritssh://codereview.qt-project.org/qt/qt5
Seehttp://wiki.qt.io/Setting-up-Gerrit
![Page 18: Intro to Gitp.3 What is Git Intro to Git Started in 2005 Created by Linus Torvalds to aid development of the Linux Kernel Primarily used for source code management in software development](https://reader034.vdocument.in/reader034/viewer/2022042808/5f8600ab7b14ef15205e9ba4/html5/thumbnails/18.jpg)
p.17
AddingreviewerstoyourChangeRequest
IntrotoGerritforQt
Findoutwhoworkedonthesourcefile(s)youarechanginggitlog[path]gitblame[path]
Oratleastaddthemodulemaintainerhttps://wiki.qt.io/Maintainers
![Page 19: Intro to Gitp.3 What is Git Intro to Git Started in 2005 Created by Linus Torvalds to aid development of the Linux Kernel Primarily used for source code management in software development](https://reader034.vdocument.in/reader034/viewer/2022042808/5f8600ab7b14ef15205e9ba4/html5/thumbnails/19.jpg)
p.18
ChangeRequest:LifeCycle
IntrotoGerritforQt
![Page 20: Intro to Gitp.3 What is Git Intro to Git Started in 2005 Created by Linus Torvalds to aid development of the Linux Kernel Primarily used for source code management in software development](https://reader034.vdocument.in/reader034/viewer/2022042808/5f8600ab7b14ef15205e9ba4/html5/thumbnails/20.jpg)
p.19
Resources
Entrypoint:https://www.qt.io/contribute-to-qthttps://wiki.qt.io/Setting_up_Gerrithttps://wiki.qt.io/Gerrit_Introduction
HelpersGitgpushscript:https://wiki.qt.io/Git-gpush-scripts
![Page 21: Intro to Gitp.3 What is Git Intro to Git Started in 2005 Created by Linus Torvalds to aid development of the Linux Kernel Primarily used for source code management in software development](https://reader034.vdocument.in/reader034/viewer/2022042808/5f8600ab7b14ef15205e9ba4/html5/thumbnails/21.jpg)
p.20
Questions?
KDABisnowofferingGittrainingsandworkshops!