SlideShare une entreprise Scribd logo
1  sur  38
Télécharger pour lire hors ligne
Git best practices
AKA
Let's write history
Git / t/ɡɪ
”A silly,incompetent,stupid,
annoying or childish person.”
http://en.wiktionary.org/wiki/git
"I'm an egotistical bastard,so I
name all my projects after myself.
First Linux,now Git”
Linus Torvalds,PC World.2012-07-14
Git popularity according to OpenHub.net
Git popularity according to Google Trends
git
svn
Why do we use git and version control at all?
Because history matters.In societies,and in software
projects too.History teaches where we came from and
where we are going.
Software is built patch by patch
When a patch is committed to version control,it becomes
a permanent part of history.
Understanding the nature of a patch is required to make
good git commits.
A patch
-attributes the author
-has a title
-may have a message
-describes the lines added,removed and modified
-the change is complete and self standing
-e.g.fixes a defect or extends functionality
You must master reading history before you can master
writing it.If you think you can master writing history
directly,you did not understand the nature of history at
all.
Browsing GitHub,Gitlab,git-web et cetera is good,but
inspecting your local copy directly is best.
git log --oneline
git show e413c6e
gitk --all
gitk --all
Note the existing style.You need to write in the same
language to be understood.
Some universal rules apply,though.
Universal git commit rules:
-Start the title line with a capital letter just like in email
-Don't end with a dot
-Keep title under 72 characters (the Github limit)
-Title is followed by one empty line,and then comes the
description
-The message part contains full sentences with ending
dots etc
-Use imperative format (Not 'Cleaned'but 'Clean up')
Commit titles must look good in'git log --oneline'
and
complete the sentence'This change will..'
Focus on describing WHY the change was made.
The revision history diff will always show WHAT was
changed.If your code is reviewed,the reviewer will focus
on judging the rationale of the WHY and compare it to
the WHAT to verify that they match.
If it is later discovered that your code had a bug,the
contents will be updated (WHAT) but the purpose of what
it does will remain (WHY).
The best and permanent place for code documentation is
in inline comments.Don't repeat inline comments in the
commit message.
The commit message should focus on why the change
was needed,while the inline comment documents the
current version of the code.
Is the change related to an issue or discussion available
somewhere else?
Include issue numbers and URLs in the commit message.
Use trigger words like "Closes #123"to enable Github to
make automatic links and update issues statuses.
Work-in-progress commits
Few people write the correct code in one go.Thus writing
the correct git commit right away might not be possible.
While developing,title the commits WIP,WIP2,WIP3 etc.
When you are done,rebase and squash the changes into
the final commits that constitute logical steps.
git rebase -i master
Other important tools to write history:
git cherry-pick e413c6e
git citool
git citool --amend
My favourite: git citool
You can also spend all day writing code and at the end of the day save
your work with 'git citool',where you can pick the hunks or lines that go
together to form the commits.
Are you committing somebody else's code?
Mark authorship correctly:
git commit -a --author "Dieter Adriaenssens <xxx@gmail.com>"
git commit --amend --author="James Cowgill <xxx@debian.org>"
git apply --author="Andreas Beckmann <xxx@debian.org>"/tmp/andreas.patch
Branches
A series of commits.The purpose of branches is to allow
different versions of the software to exists in parallel.
Typically there is a development master branch and a
relase branch v1,which can evolve in separate
directions.
The master branch may become release v2 while the v1
branch may become release v1.1.
All developers branch from
master and then merge back.
New releases branch
from master.
Support releases branch
from release branch.
Image source:
http://tleyden.github.io/blog/2014/04/09/a-suc
cessful-git-branching-model-with-enterprise-su
pport/
The holy master principle:
Never break the master branch!
All developers working to create new features or fix bugs
use the current master branch as the base of their work.
If the master is already broken,it will be difficult to fix
the bug the developer intended to spend time fixing,or a
new feature cannot be made to be functional if the
starting point wasn't functional either.
Git is a distributed version control system
Every copy of the repository is a branch in itself.To share
branches with others before they are merged to master,
label the branch with a separate name.
git checkout master
git pull master
git checkout -b feature-automatic-renewals
git citool
...
git push origin feature-automatic-renewals
Apply the changes made by a collaborator:
git pull http://people.debian.org/~sthibault/tmp/mariadb-10.0 feature-hurd
After this your feature-hurd branch will have the same
contents,and you can continue improving it.
Many prefer to publish and pull via GitHub,but any server
you can push files on with SSH and pull via SSH or HTTP
will do.
The holy QualityAssurance principle:
all commits on master should go via review
GitHub "Pull Requests"facilitate this.
Gerrit and Gerrithub for more formal teams.
Review principles:
-Give feedback,even nitty gritty,to perfection the code
(and documentation!).
-Let the submitter fix it themselves,thus keeping
authorship and commitment to maintaining the code.
-Reviewing as an opportunity to learn.Both for the
reviewee and reviewer!
Review stalls (often,unfortunately):
-Reviewer does not agree on the motivation to the
change
-Reviewer does not understand the contents of the
changes
-Poor documentation,unlogical commits
-Lack of QA,no testcases,no external verification
-Unfit change for the upcoming release,lack of time,
wrong reviewer
The holy history principle: never force push on master
Except if you are really quick and sure that nobody made
a git pull in between.
If the rule is broken,developers and systems will have
diverged versions of master,and everybody will need to
do manual merges or dangerous force pulls.
Remember: good outcomes require a lot of work
Don't feel frustrated.The devil is often in the details and
the nature of high quality code and reliable systems
require diligent review. All big stable systems grew our
of very small stable systems.
Do not sacrifice stability for development velocity,
otherwise it will just collect debt and require twice as
much work later and grind development velocity to a full
stop.
The hotfix principle
If you have blinking lights and sirens yelling,
you can and should do whatever you need to.
Beginner tips
Learn the basics: http://try.github.com/
SSH-keys:
https://help.github.com/articles/generating-ssh-keys/
Keep branch name visible in the bash prompt:
https://github.com/ottok/tooling/blob/master/bashrc/bashrc.git
Contact Seravo if you need experts in
Linux,Git or other
open source software
Open seravo.fi
See our blog for in-depth tips

Contenu connexe

Tendances

Git Tutorial For Beginners | What is Git and GitHub? | DevOps Tools | DevOps ...
Git Tutorial For Beginners | What is Git and GitHub? | DevOps Tools | DevOps ...Git Tutorial For Beginners | What is Git and GitHub? | DevOps Tools | DevOps ...
Git Tutorial For Beginners | What is Git and GitHub? | DevOps Tools | DevOps ...Simplilearn
 
Introduction to Git and GitHub Part 1
Introduction to Git and GitHub Part 1Introduction to Git and GitHub Part 1
Introduction to Git and GitHub Part 1Omar Fathy
 
Git 101 - Crash Course in Version Control using Git
Git 101 - Crash Course in Version Control using GitGit 101 - Crash Course in Version Control using Git
Git 101 - Crash Course in Version Control using GitGeoff Hoffman
 
Introduction to Git and Github
Introduction to Git and GithubIntroduction to Git and Github
Introduction to Git and GithubHouari ZEGAI
 
Inside GitHub
Inside GitHubInside GitHub
Inside GitHuberr
 
Intro to Git and GitHub
Intro to Git and GitHubIntro to Git and GitHub
Intro to Git and GitHubUri Goldstein
 
GitFlow, SourceTree and GitLab
GitFlow, SourceTree and GitLabGitFlow, SourceTree and GitLab
GitFlow, SourceTree and GitLabShinu Suresh
 
Git and git workflow best practice
Git and git workflow best practiceGit and git workflow best practice
Git and git workflow best practiceMajid Hosseini
 
Github - Git Training Slides: Foundations
Github - Git Training Slides: FoundationsGithub - Git Training Slides: Foundations
Github - Git Training Slides: FoundationsLee Hanxue
 
Git, GitHub and Open Source
Git, GitHub and Open SourceGit, GitHub and Open Source
Git, GitHub and Open SourceLorna Mitchell
 
Git basics to advance with diagrams
Git basics to advance with diagramsGit basics to advance with diagrams
Git basics to advance with diagramsDilum Navanjana
 
Introduction to Git
Introduction to GitIntroduction to Git
Introduction to GitLukas Fittl
 
Introduction to git and Github
Introduction to git and GithubIntroduction to git and Github
Introduction to git and GithubWycliff1
 

Tendances (20)

Git Tutorial For Beginners | What is Git and GitHub? | DevOps Tools | DevOps ...
Git Tutorial For Beginners | What is Git and GitHub? | DevOps Tools | DevOps ...Git Tutorial For Beginners | What is Git and GitHub? | DevOps Tools | DevOps ...
Git Tutorial For Beginners | What is Git and GitHub? | DevOps Tools | DevOps ...
 
Intro to Git & GitHub
Intro to Git & GitHubIntro to Git & GitHub
Intro to Git & GitHub
 
Introduction to Git and GitHub Part 1
Introduction to Git and GitHub Part 1Introduction to Git and GitHub Part 1
Introduction to Git and GitHub Part 1
 
CI is dead, long live CI
CI is dead, long live CICI is dead, long live CI
CI is dead, long live CI
 
Inside GitHub with Chris Wanstrath
Inside GitHub with Chris WanstrathInside GitHub with Chris Wanstrath
Inside GitHub with Chris Wanstrath
 
Git 101 - Crash Course in Version Control using Git
Git 101 - Crash Course in Version Control using GitGit 101 - Crash Course in Version Control using Git
Git 101 - Crash Course in Version Control using Git
 
git and github
git and githubgit and github
git and github
 
GitHub Presentation
GitHub PresentationGitHub Presentation
GitHub Presentation
 
Introduction to Git and Github
Introduction to Git and GithubIntroduction to Git and Github
Introduction to Git and Github
 
Inside GitHub
Inside GitHubInside GitHub
Inside GitHub
 
Intro to Git and GitHub
Intro to Git and GitHubIntro to Git and GitHub
Intro to Git and GitHub
 
GitFlow, SourceTree and GitLab
GitFlow, SourceTree and GitLabGitFlow, SourceTree and GitLab
GitFlow, SourceTree and GitLab
 
A prentation on github
A prentation on githubA prentation on github
A prentation on github
 
Git and git workflow best practice
Git and git workflow best practiceGit and git workflow best practice
Git and git workflow best practice
 
Github - Git Training Slides: Foundations
Github - Git Training Slides: FoundationsGithub - Git Training Slides: Foundations
Github - Git Training Slides: Foundations
 
Git, GitHub and Open Source
Git, GitHub and Open SourceGit, GitHub and Open Source
Git, GitHub and Open Source
 
Git basics to advance with diagrams
Git basics to advance with diagramsGit basics to advance with diagrams
Git basics to advance with diagrams
 
Github
GithubGithub
Github
 
Introduction to Git
Introduction to GitIntroduction to Git
Introduction to Git
 
Introduction to git and Github
Introduction to git and GithubIntroduction to git and Github
Introduction to git and Github
 

En vedette

WordPress security 101 - WP Turku Meetup 2.2.2017
WordPress security 101 - WP Turku Meetup 2.2.2017WordPress security 101 - WP Turku Meetup 2.2.2017
WordPress security 101 - WP Turku Meetup 2.2.2017Otto Kekäläinen
 
WordPress security 101 - WP Jyväskylä Meetup 21.3.2017
WordPress security 101 - WP Jyväskylä Meetup 21.3.2017WordPress security 101 - WP Jyväskylä Meetup 21.3.2017
WordPress security 101 - WP Jyväskylä Meetup 21.3.2017Otto Kekäläinen
 
Find WordPress performance bottlenecks with XDebug PHP profiling
Find WordPress performance bottlenecks with XDebug PHP profilingFind WordPress performance bottlenecks with XDebug PHP profiling
Find WordPress performance bottlenecks with XDebug PHP profilingOtto Kekäläinen
 
Visual Design with Data
Visual Design with DataVisual Design with Data
Visual Design with DataSeth Familian
 
To Rebase or Not to Rebase: Taming Your Git History
To Rebase or Not to Rebase: Taming Your Git History To Rebase or Not to Rebase: Taming Your Git History
To Rebase or Not to Rebase: Taming Your Git History Perforce
 
Keep you GIT history clean
Keep you GIT history cleanKeep you GIT history clean
Keep you GIT history cleantomasbro
 
MariaDB Developers Meetup 2016 welcome words
MariaDB Developers Meetup 2016 welcome wordsMariaDB Developers Meetup 2016 welcome words
MariaDB Developers Meetup 2016 welcome wordsOtto Kekäläinen
 
Collaboration in open source - examples from MariaDB
Collaboration in open source - examples from MariaDBCollaboration in open source - examples from MariaDB
Collaboration in open source - examples from MariaDBOtto Kekäläinen
 
WordPress ja markkinointiautomaatio (DigitalTre-esitys)
WordPress ja markkinointiautomaatio (DigitalTre-esitys)WordPress ja markkinointiautomaatio (DigitalTre-esitys)
WordPress ja markkinointiautomaatio (DigitalTre-esitys)Otto Kekäläinen
 
MariaDB in Debian and Ubuntu: The next million users
MariaDB in Debian and Ubuntu: The next million usersMariaDB in Debian and Ubuntu: The next million users
MariaDB in Debian and Ubuntu: The next million usersOtto Kekäläinen
 
Koodikerho PEPE Pajapäivä 6.9.2016
Koodikerho PEPE Pajapäivä 6.9.2016Koodikerho PEPE Pajapäivä 6.9.2016
Koodikerho PEPE Pajapäivä 6.9.2016Otto Kekäläinen
 
Koodikerho: ohjelmointia alakouluissa
Koodikerho: ohjelmointia alakouluissaKoodikerho: ohjelmointia alakouluissa
Koodikerho: ohjelmointia alakouluissaOtto Kekäläinen
 
MariaDB Foundation presentation and membership info
MariaDB Foundation presentation and membership infoMariaDB Foundation presentation and membership info
MariaDB Foundation presentation and membership infoOtto Kekäläinen
 
WordPress Security 101 – WordCamp Finland 2016 presentation by Otto Kekäläine...
WordPress Security 101 – WordCamp Finland 2016 presentation by Otto Kekäläine...WordPress Security 101 – WordCamp Finland 2016 presentation by Otto Kekäläine...
WordPress Security 101 – WordCamp Finland 2016 presentation by Otto Kekäläine...Otto Kekäläinen
 
Testing and updating WordPress - Advanced techniques for avoiding regressions
Testing and updating WordPress - Advanced techniques for avoiding regressionsTesting and updating WordPress - Advanced techniques for avoiding regressions
Testing and updating WordPress - Advanced techniques for avoiding regressionsOtto Kekäläinen
 
Less passwords, more security: unix socket authentication and other MariaDB h...
Less passwords, more security: unix socket authentication and other MariaDB h...Less passwords, more security: unix socket authentication and other MariaDB h...
Less passwords, more security: unix socket authentication and other MariaDB h...Otto Kekäläinen
 
Computer-free Website Development Demo - WordPressDC Jan 2015
 Computer-free Website Development Demo - WordPressDC Jan 2015 Computer-free Website Development Demo - WordPressDC Jan 2015
Computer-free Website Development Demo - WordPressDC Jan 2015Anthony D. Paul
 

En vedette (20)

WordPress security 101 - WP Turku Meetup 2.2.2017
WordPress security 101 - WP Turku Meetup 2.2.2017WordPress security 101 - WP Turku Meetup 2.2.2017
WordPress security 101 - WP Turku Meetup 2.2.2017
 
WordPress security 101 - WP Jyväskylä Meetup 21.3.2017
WordPress security 101 - WP Jyväskylä Meetup 21.3.2017WordPress security 101 - WP Jyväskylä Meetup 21.3.2017
WordPress security 101 - WP Jyväskylä Meetup 21.3.2017
 
Find WordPress performance bottlenecks with XDebug PHP profiling
Find WordPress performance bottlenecks with XDebug PHP profilingFind WordPress performance bottlenecks with XDebug PHP profiling
Find WordPress performance bottlenecks with XDebug PHP profiling
 
Visual Design with Data
Visual Design with DataVisual Design with Data
Visual Design with Data
 
GIT guidelines
GIT guidelinesGIT guidelines
GIT guidelines
 
Build Features, Not Apps
Build Features, Not AppsBuild Features, Not Apps
Build Features, Not Apps
 
To Rebase or Not to Rebase: Taming Your Git History
To Rebase or Not to Rebase: Taming Your Git History To Rebase or Not to Rebase: Taming Your Git History
To Rebase or Not to Rebase: Taming Your Git History
 
Keep you GIT history clean
Keep you GIT history cleanKeep you GIT history clean
Keep you GIT history clean
 
Git essentials
Git essentialsGit essentials
Git essentials
 
MariaDB Developers Meetup 2016 welcome words
MariaDB Developers Meetup 2016 welcome wordsMariaDB Developers Meetup 2016 welcome words
MariaDB Developers Meetup 2016 welcome words
 
Collaboration in open source - examples from MariaDB
Collaboration in open source - examples from MariaDBCollaboration in open source - examples from MariaDB
Collaboration in open source - examples from MariaDB
 
WordPress ja markkinointiautomaatio (DigitalTre-esitys)
WordPress ja markkinointiautomaatio (DigitalTre-esitys)WordPress ja markkinointiautomaatio (DigitalTre-esitys)
WordPress ja markkinointiautomaatio (DigitalTre-esitys)
 
MariaDB in Debian and Ubuntu: The next million users
MariaDB in Debian and Ubuntu: The next million usersMariaDB in Debian and Ubuntu: The next million users
MariaDB in Debian and Ubuntu: The next million users
 
Koodikerho PEPE Pajapäivä 6.9.2016
Koodikerho PEPE Pajapäivä 6.9.2016Koodikerho PEPE Pajapäivä 6.9.2016
Koodikerho PEPE Pajapäivä 6.9.2016
 
Koodikerho: ohjelmointia alakouluissa
Koodikerho: ohjelmointia alakouluissaKoodikerho: ohjelmointia alakouluissa
Koodikerho: ohjelmointia alakouluissa
 
MariaDB Foundation presentation and membership info
MariaDB Foundation presentation and membership infoMariaDB Foundation presentation and membership info
MariaDB Foundation presentation and membership info
 
WordPress Security 101 – WordCamp Finland 2016 presentation by Otto Kekäläine...
WordPress Security 101 – WordCamp Finland 2016 presentation by Otto Kekäläine...WordPress Security 101 – WordCamp Finland 2016 presentation by Otto Kekäläine...
WordPress Security 101 – WordCamp Finland 2016 presentation by Otto Kekäläine...
 
Testing and updating WordPress - Advanced techniques for avoiding regressions
Testing and updating WordPress - Advanced techniques for avoiding regressionsTesting and updating WordPress - Advanced techniques for avoiding regressions
Testing and updating WordPress - Advanced techniques for avoiding regressions
 
Less passwords, more security: unix socket authentication and other MariaDB h...
Less passwords, more security: unix socket authentication and other MariaDB h...Less passwords, more security: unix socket authentication and other MariaDB h...
Less passwords, more security: unix socket authentication and other MariaDB h...
 
Computer-free Website Development Demo - WordPressDC Jan 2015
 Computer-free Website Development Demo - WordPressDC Jan 2015 Computer-free Website Development Demo - WordPressDC Jan 2015
Computer-free Website Development Demo - WordPressDC Jan 2015
 

Similaire à Git best practices for writing clean history

Introduction to Git for developers
Introduction to Git for developersIntroduction to Git for developers
Introduction to Git for developersDmitry Guyvoronsky
 
Git_tutorial.pdf
Git_tutorial.pdfGit_tutorial.pdf
Git_tutorial.pdfAliaaTarek5
 
Vincit Teatime 2015.2 - Otto Kekäläinen: Don't be a git
Vincit Teatime 2015.2 - Otto Kekäläinen: Don't be a gitVincit Teatime 2015.2 - Otto Kekäläinen: Don't be a git
Vincit Teatime 2015.2 - Otto Kekäläinen: Don't be a gitVincitOy
 
Git essential training & sharing self
Git essential training & sharing selfGit essential training & sharing self
Git essential training & sharing selfChen-Tien Tsai
 
Contributing to Upstream Open Source Projects
Contributing to Upstream Open Source ProjectsContributing to Upstream Open Source Projects
Contributing to Upstream Open Source ProjectsScott Garman
 
Workshop on Git and GitHub
Workshop on Git and GitHubWorkshop on Git and GitHub
Workshop on Git and GitHubDSCVSSUT
 
Introduction to git hub
Introduction to git hubIntroduction to git hub
Introduction to git hubNaveen Pandey
 
[2015/2016] Collaborative software development with Git
[2015/2016] Collaborative software development with Git[2015/2016] Collaborative software development with Git
[2015/2016] Collaborative software development with GitIvano Malavolta
 
Git Session 2K23.pptx
Git Session 2K23.pptxGit Session 2K23.pptx
Git Session 2K23.pptxEshaan35
 
A Git MVP Workflow
A Git MVP WorkflowA Git MVP Workflow
A Git MVP WorkflowBurt Lum
 
CSE 390 Lecture 9 - Version Control with GIT
CSE 390 Lecture 9 - Version Control with GITCSE 390 Lecture 9 - Version Control with GIT
CSE 390 Lecture 9 - Version Control with GITPouriaQashqai1
 

Similaire à Git best practices for writing clean history (20)

Introduction to Git for developers
Introduction to Git for developersIntroduction to Git for developers
Introduction to Git for developers
 
Git_tutorial.pdf
Git_tutorial.pdfGit_tutorial.pdf
Git_tutorial.pdf
 
Mini-training: Let’s Git It!
Mini-training: Let’s Git It!Mini-training: Let’s Git It!
Mini-training: Let’s Git It!
 
Vincit Teatime 2015.2 - Otto Kekäläinen: Don't be a git
Vincit Teatime 2015.2 - Otto Kekäläinen: Don't be a gitVincit Teatime 2015.2 - Otto Kekäläinen: Don't be a git
Vincit Teatime 2015.2 - Otto Kekäläinen: Don't be a git
 
Git essential training & sharing self
Git essential training & sharing selfGit essential training & sharing self
Git essential training & sharing self
 
Contributing to Upstream Open Source Projects
Contributing to Upstream Open Source ProjectsContributing to Upstream Open Source Projects
Contributing to Upstream Open Source Projects
 
Workshop on Git and GitHub
Workshop on Git and GitHubWorkshop on Git and GitHub
Workshop on Git and GitHub
 
Git Tutorial
Git Tutorial Git Tutorial
Git Tutorial
 
Introduction to git hub
Introduction to git hubIntroduction to git hub
Introduction to git hub
 
Git workshop
Git workshopGit workshop
Git workshop
 
[2015/2016] Collaborative software development with Git
[2015/2016] Collaborative software development with Git[2015/2016] Collaborative software development with Git
[2015/2016] Collaborative software development with Git
 
Git & Code review
Git & Code reviewGit & Code review
Git & Code review
 
Migrating To GitHub
Migrating To GitHub  Migrating To GitHub
Migrating To GitHub
 
Git Session 2K23.pptx
Git Session 2K23.pptxGit Session 2K23.pptx
Git Session 2K23.pptx
 
3 Git
3 Git3 Git
3 Git
 
Git
GitGit
Git
 
Git
GitGit
Git
 
Git
GitGit
Git
 
A Git MVP Workflow
A Git MVP WorkflowA Git MVP Workflow
A Git MVP Workflow
 
CSE 390 Lecture 9 - Version Control with GIT
CSE 390 Lecture 9 - Version Control with GITCSE 390 Lecture 9 - Version Control with GIT
CSE 390 Lecture 9 - Version Control with GIT
 

Plus de Otto Kekäläinen

FOSDEM2021: MariaDB post-release quality assurance in Debian and Ubuntu
FOSDEM2021: MariaDB post-release quality assurance in Debian and UbuntuFOSDEM2021: MariaDB post-release quality assurance in Debian and Ubuntu
FOSDEM2021: MariaDB post-release quality assurance in Debian and UbuntuOtto Kekäläinen
 
Search in WordPress - how it works and howto customize it
Search in WordPress - how it works and howto customize itSearch in WordPress - how it works and howto customize it
Search in WordPress - how it works and howto customize itOtto Kekäläinen
 
MariaDB quality assurance in Debian and Ubuntu
MariaDB quality assurance in Debian and UbuntuMariaDB quality assurance in Debian and Ubuntu
MariaDB quality assurance in Debian and UbuntuOtto Kekäläinen
 
DebConf 2020: What’s New in MariaDB Server 10.5 and Galera 4?
DebConf 2020: What’s New in MariaDB Server 10.5 and Galera 4?DebConf 2020: What’s New in MariaDB Server 10.5 and Galera 4?
DebConf 2020: What’s New in MariaDB Server 10.5 and Galera 4?Otto Kekäläinen
 
Technical SEO for WordPress - 2019 edition
Technical SEO for WordPress - 2019 editionTechnical SEO for WordPress - 2019 edition
Technical SEO for WordPress - 2019 editionOtto Kekäläinen
 
The 5 most common reasons for a slow WordPress site and how to fix them – ext...
The 5 most common reasons for a slow WordPress site and how to fix them – ext...The 5 most common reasons for a slow WordPress site and how to fix them – ext...
The 5 most common reasons for a slow WordPress site and how to fix them – ext...Otto Kekäläinen
 
How MariaDB packaging uses Salsa-CI to ensure smooth upgrades and avoid regre...
How MariaDB packaging uses Salsa-CI to ensure smooth upgrades and avoid regre...How MariaDB packaging uses Salsa-CI to ensure smooth upgrades and avoid regre...
How MariaDB packaging uses Salsa-CI to ensure smooth upgrades and avoid regre...Otto Kekäläinen
 
DebConf 2019 MariaDB packaging in Debian BoF
DebConf 2019 MariaDB packaging in Debian BoFDebConf 2019 MariaDB packaging in Debian BoF
DebConf 2019 MariaDB packaging in Debian BoFOtto Kekäläinen
 
The 5 most common reasons for a slow WordPress site and how to fix them
The 5 most common reasons for a slow WordPress site and how to fix themThe 5 most common reasons for a slow WordPress site and how to fix them
The 5 most common reasons for a slow WordPress site and how to fix themOtto Kekäläinen
 
How to investigate and recover from a security breach in WordPress
How to investigate and recover from a security breach in WordPressHow to investigate and recover from a security breach in WordPress
How to investigate and recover from a security breach in WordPressOtto Kekäläinen
 
Automatic testing and quality assurance for WordPress plugins and themes
Automatic testing and quality assurance for WordPress plugins and themesAutomatic testing and quality assurance for WordPress plugins and themes
Automatic testing and quality assurance for WordPress plugins and themesOtto Kekäläinen
 
10 things every developer should know about their database to run word press ...
10 things every developer should know about their database to run word press ...10 things every developer should know about their database to run word press ...
10 things every developer should know about their database to run word press ...Otto Kekäläinen
 
Automatic testing and quality assurance for WordPress plugins
Automatic testing and quality assurance for WordPress pluginsAutomatic testing and quality assurance for WordPress plugins
Automatic testing and quality assurance for WordPress pluginsOtto Kekäläinen
 
Improving WordPress performance (xdebug and profiling)
Improving WordPress performance (xdebug and profiling)Improving WordPress performance (xdebug and profiling)
Improving WordPress performance (xdebug and profiling)Otto Kekäläinen
 
WordPress-tietoturvan perusteet
WordPress-tietoturvan perusteetWordPress-tietoturvan perusteet
WordPress-tietoturvan perusteetOtto Kekäläinen
 
Technical SEO for WordPress - 2017 edition
Technical SEO for WordPress - 2017 editionTechnical SEO for WordPress - 2017 edition
Technical SEO for WordPress - 2017 editionOtto Kekäläinen
 
Improving WordPress Performance with Xdebug and PHP Profiling
Improving WordPress Performance with Xdebug and PHP ProfilingImproving WordPress Performance with Xdebug and PHP Profiling
Improving WordPress Performance with Xdebug and PHP ProfilingOtto Kekäläinen
 
MariaDB adoption in Linux distributions and development environments
MariaDB adoption in Linux distributions and development environmentsMariaDB adoption in Linux distributions and development environments
MariaDB adoption in Linux distributions and development environmentsOtto Kekäläinen
 
DebConf16 BoF on MariaDB/MySQL packaging
DebConf16 BoF on MariaDB/MySQL packagingDebConf16 BoF on MariaDB/MySQL packaging
DebConf16 BoF on MariaDB/MySQL packagingOtto Kekäläinen
 

Plus de Otto Kekäläinen (20)

FOSDEM2021: MariaDB post-release quality assurance in Debian and Ubuntu
FOSDEM2021: MariaDB post-release quality assurance in Debian and UbuntuFOSDEM2021: MariaDB post-release quality assurance in Debian and Ubuntu
FOSDEM2021: MariaDB post-release quality assurance in Debian and Ubuntu
 
Search in WordPress - how it works and howto customize it
Search in WordPress - how it works and howto customize itSearch in WordPress - how it works and howto customize it
Search in WordPress - how it works and howto customize it
 
MariaDB quality assurance in Debian and Ubuntu
MariaDB quality assurance in Debian and UbuntuMariaDB quality assurance in Debian and Ubuntu
MariaDB quality assurance in Debian and Ubuntu
 
DebConf 2020: What’s New in MariaDB Server 10.5 and Galera 4?
DebConf 2020: What’s New in MariaDB Server 10.5 and Galera 4?DebConf 2020: What’s New in MariaDB Server 10.5 and Galera 4?
DebConf 2020: What’s New in MariaDB Server 10.5 and Galera 4?
 
Technical SEO for WordPress - 2019 edition
Technical SEO for WordPress - 2019 editionTechnical SEO for WordPress - 2019 edition
Technical SEO for WordPress - 2019 edition
 
The 5 most common reasons for a slow WordPress site and how to fix them – ext...
The 5 most common reasons for a slow WordPress site and how to fix them – ext...The 5 most common reasons for a slow WordPress site and how to fix them – ext...
The 5 most common reasons for a slow WordPress site and how to fix them – ext...
 
How MariaDB packaging uses Salsa-CI to ensure smooth upgrades and avoid regre...
How MariaDB packaging uses Salsa-CI to ensure smooth upgrades and avoid regre...How MariaDB packaging uses Salsa-CI to ensure smooth upgrades and avoid regre...
How MariaDB packaging uses Salsa-CI to ensure smooth upgrades and avoid regre...
 
DebConf 2019 MariaDB packaging in Debian BoF
DebConf 2019 MariaDB packaging in Debian BoFDebConf 2019 MariaDB packaging in Debian BoF
DebConf 2019 MariaDB packaging in Debian BoF
 
The 5 most common reasons for a slow WordPress site and how to fix them
The 5 most common reasons for a slow WordPress site and how to fix themThe 5 most common reasons for a slow WordPress site and how to fix them
The 5 most common reasons for a slow WordPress site and how to fix them
 
How to investigate and recover from a security breach in WordPress
How to investigate and recover from a security breach in WordPressHow to investigate and recover from a security breach in WordPress
How to investigate and recover from a security breach in WordPress
 
Technical SEO for WordPress
Technical SEO for WordPressTechnical SEO for WordPress
Technical SEO for WordPress
 
Automatic testing and quality assurance for WordPress plugins and themes
Automatic testing and quality assurance for WordPress plugins and themesAutomatic testing and quality assurance for WordPress plugins and themes
Automatic testing and quality assurance for WordPress plugins and themes
 
10 things every developer should know about their database to run word press ...
10 things every developer should know about their database to run word press ...10 things every developer should know about their database to run word press ...
10 things every developer should know about their database to run word press ...
 
Automatic testing and quality assurance for WordPress plugins
Automatic testing and quality assurance for WordPress pluginsAutomatic testing and quality assurance for WordPress plugins
Automatic testing and quality assurance for WordPress plugins
 
Improving WordPress performance (xdebug and profiling)
Improving WordPress performance (xdebug and profiling)Improving WordPress performance (xdebug and profiling)
Improving WordPress performance (xdebug and profiling)
 
WordPress-tietoturvan perusteet
WordPress-tietoturvan perusteetWordPress-tietoturvan perusteet
WordPress-tietoturvan perusteet
 
Technical SEO for WordPress - 2017 edition
Technical SEO for WordPress - 2017 editionTechnical SEO for WordPress - 2017 edition
Technical SEO for WordPress - 2017 edition
 
Improving WordPress Performance with Xdebug and PHP Profiling
Improving WordPress Performance with Xdebug and PHP ProfilingImproving WordPress Performance with Xdebug and PHP Profiling
Improving WordPress Performance with Xdebug and PHP Profiling
 
MariaDB adoption in Linux distributions and development environments
MariaDB adoption in Linux distributions and development environmentsMariaDB adoption in Linux distributions and development environments
MariaDB adoption in Linux distributions and development environments
 
DebConf16 BoF on MariaDB/MySQL packaging
DebConf16 BoF on MariaDB/MySQL packagingDebConf16 BoF on MariaDB/MySQL packaging
DebConf16 BoF on MariaDB/MySQL packaging
 

Dernier

The Real-World Challenges of Medical Device Cybersecurity- Mitigating Vulnera...
The Real-World Challenges of Medical Device Cybersecurity- Mitigating Vulnera...The Real-World Challenges of Medical Device Cybersecurity- Mitigating Vulnera...
The Real-World Challenges of Medical Device Cybersecurity- Mitigating Vulnera...ICS
 
Try MyIntelliAccount Cloud Accounting Software As A Service Solution Risk Fre...
Try MyIntelliAccount Cloud Accounting Software As A Service Solution Risk Fre...Try MyIntelliAccount Cloud Accounting Software As A Service Solution Risk Fre...
Try MyIntelliAccount Cloud Accounting Software As A Service Solution Risk Fre...MyIntelliSource, Inc.
 
CALL ON ➥8923113531 🔝Call Girls Badshah Nagar Lucknow best Female service
CALL ON ➥8923113531 🔝Call Girls Badshah Nagar Lucknow best Female serviceCALL ON ➥8923113531 🔝Call Girls Badshah Nagar Lucknow best Female service
CALL ON ➥8923113531 🔝Call Girls Badshah Nagar Lucknow best Female serviceanilsa9823
 
HR Software Buyers Guide in 2024 - HRSoftware.com
HR Software Buyers Guide in 2024 - HRSoftware.comHR Software Buyers Guide in 2024 - HRSoftware.com
HR Software Buyers Guide in 2024 - HRSoftware.comFatema Valibhai
 
TECUNIQUE: Success Stories: IT Service provider
TECUNIQUE: Success Stories: IT Service providerTECUNIQUE: Success Stories: IT Service provider
TECUNIQUE: Success Stories: IT Service providermohitmore19
 
Optimizing AI for immediate response in Smart CCTV
Optimizing AI for immediate response in Smart CCTVOptimizing AI for immediate response in Smart CCTV
Optimizing AI for immediate response in Smart CCTVshikhaohhpro
 
+971565801893>>SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHAB...
+971565801893>>SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHAB...+971565801893>>SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHAB...
+971565801893>>SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHAB...Health
 
Right Money Management App For Your Financial Goals
Right Money Management App For Your Financial GoalsRight Money Management App For Your Financial Goals
Right Money Management App For Your Financial GoalsJhone kinadey
 
Tech Tuesday-Harness the Power of Effective Resource Planning with OnePlan’s ...
Tech Tuesday-Harness the Power of Effective Resource Planning with OnePlan’s ...Tech Tuesday-Harness the Power of Effective Resource Planning with OnePlan’s ...
Tech Tuesday-Harness the Power of Effective Resource Planning with OnePlan’s ...OnePlan Solutions
 
A Secure and Reliable Document Management System is Essential.docx
A Secure and Reliable Document Management System is Essential.docxA Secure and Reliable Document Management System is Essential.docx
A Secure and Reliable Document Management System is Essential.docxComplianceQuest1
 
W01_panagenda_Navigating-the-Future-with-The-Hitchhikers-Guide-to-Notes-and-D...
W01_panagenda_Navigating-the-Future-with-The-Hitchhikers-Guide-to-Notes-and-D...W01_panagenda_Navigating-the-Future-with-The-Hitchhikers-Guide-to-Notes-and-D...
W01_panagenda_Navigating-the-Future-with-The-Hitchhikers-Guide-to-Notes-and-D...panagenda
 
call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️
call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️
call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️Delhi Call girls
 
CALL ON ➥8923113531 🔝Call Girls Kakori Lucknow best sexual service Online ☂️
CALL ON ➥8923113531 🔝Call Girls Kakori Lucknow best sexual service Online  ☂️CALL ON ➥8923113531 🔝Call Girls Kakori Lucknow best sexual service Online  ☂️
CALL ON ➥8923113531 🔝Call Girls Kakori Lucknow best sexual service Online ☂️anilsa9823
 
Unveiling the Tech Salsa of LAMs with Janus in Real-Time Applications
Unveiling the Tech Salsa of LAMs with Janus in Real-Time ApplicationsUnveiling the Tech Salsa of LAMs with Janus in Real-Time Applications
Unveiling the Tech Salsa of LAMs with Janus in Real-Time ApplicationsAlberto González Trastoy
 
The Ultimate Test Automation Guide_ Best Practices and Tips.pdf
The Ultimate Test Automation Guide_ Best Practices and Tips.pdfThe Ultimate Test Automation Guide_ Best Practices and Tips.pdf
The Ultimate Test Automation Guide_ Best Practices and Tips.pdfkalichargn70th171
 
Reassessing the Bedrock of Clinical Function Models: An Examination of Large ...
Reassessing the Bedrock of Clinical Function Models: An Examination of Large ...Reassessing the Bedrock of Clinical Function Models: An Examination of Large ...
Reassessing the Bedrock of Clinical Function Models: An Examination of Large ...harshavardhanraghave
 
5 Signs You Need a Fashion PLM Software.pdf
5 Signs You Need a Fashion PLM Software.pdf5 Signs You Need a Fashion PLM Software.pdf
5 Signs You Need a Fashion PLM Software.pdfWave PLM
 
Hand gesture recognition PROJECT PPT.pptx
Hand gesture recognition PROJECT PPT.pptxHand gesture recognition PROJECT PPT.pptx
Hand gesture recognition PROJECT PPT.pptxbodapatigopi8531
 

Dernier (20)

The Real-World Challenges of Medical Device Cybersecurity- Mitigating Vulnera...
The Real-World Challenges of Medical Device Cybersecurity- Mitigating Vulnera...The Real-World Challenges of Medical Device Cybersecurity- Mitigating Vulnera...
The Real-World Challenges of Medical Device Cybersecurity- Mitigating Vulnera...
 
Vip Call Girls Noida ➡️ Delhi ➡️ 9999965857 No Advance 24HRS Live
Vip Call Girls Noida ➡️ Delhi ➡️ 9999965857 No Advance 24HRS LiveVip Call Girls Noida ➡️ Delhi ➡️ 9999965857 No Advance 24HRS Live
Vip Call Girls Noida ➡️ Delhi ➡️ 9999965857 No Advance 24HRS Live
 
Try MyIntelliAccount Cloud Accounting Software As A Service Solution Risk Fre...
Try MyIntelliAccount Cloud Accounting Software As A Service Solution Risk Fre...Try MyIntelliAccount Cloud Accounting Software As A Service Solution Risk Fre...
Try MyIntelliAccount Cloud Accounting Software As A Service Solution Risk Fre...
 
CALL ON ➥8923113531 🔝Call Girls Badshah Nagar Lucknow best Female service
CALL ON ➥8923113531 🔝Call Girls Badshah Nagar Lucknow best Female serviceCALL ON ➥8923113531 🔝Call Girls Badshah Nagar Lucknow best Female service
CALL ON ➥8923113531 🔝Call Girls Badshah Nagar Lucknow best Female service
 
HR Software Buyers Guide in 2024 - HRSoftware.com
HR Software Buyers Guide in 2024 - HRSoftware.comHR Software Buyers Guide in 2024 - HRSoftware.com
HR Software Buyers Guide in 2024 - HRSoftware.com
 
TECUNIQUE: Success Stories: IT Service provider
TECUNIQUE: Success Stories: IT Service providerTECUNIQUE: Success Stories: IT Service provider
TECUNIQUE: Success Stories: IT Service provider
 
Optimizing AI for immediate response in Smart CCTV
Optimizing AI for immediate response in Smart CCTVOptimizing AI for immediate response in Smart CCTV
Optimizing AI for immediate response in Smart CCTV
 
+971565801893>>SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHAB...
+971565801893>>SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHAB...+971565801893>>SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHAB...
+971565801893>>SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHAB...
 
Right Money Management App For Your Financial Goals
Right Money Management App For Your Financial GoalsRight Money Management App For Your Financial Goals
Right Money Management App For Your Financial Goals
 
Tech Tuesday-Harness the Power of Effective Resource Planning with OnePlan’s ...
Tech Tuesday-Harness the Power of Effective Resource Planning with OnePlan’s ...Tech Tuesday-Harness the Power of Effective Resource Planning with OnePlan’s ...
Tech Tuesday-Harness the Power of Effective Resource Planning with OnePlan’s ...
 
CHEAP Call Girls in Pushp Vihar (-DELHI )🔝 9953056974🔝(=)/CALL GIRLS SERVICE
CHEAP Call Girls in Pushp Vihar (-DELHI )🔝 9953056974🔝(=)/CALL GIRLS SERVICECHEAP Call Girls in Pushp Vihar (-DELHI )🔝 9953056974🔝(=)/CALL GIRLS SERVICE
CHEAP Call Girls in Pushp Vihar (-DELHI )🔝 9953056974🔝(=)/CALL GIRLS SERVICE
 
A Secure and Reliable Document Management System is Essential.docx
A Secure and Reliable Document Management System is Essential.docxA Secure and Reliable Document Management System is Essential.docx
A Secure and Reliable Document Management System is Essential.docx
 
W01_panagenda_Navigating-the-Future-with-The-Hitchhikers-Guide-to-Notes-and-D...
W01_panagenda_Navigating-the-Future-with-The-Hitchhikers-Guide-to-Notes-and-D...W01_panagenda_Navigating-the-Future-with-The-Hitchhikers-Guide-to-Notes-and-D...
W01_panagenda_Navigating-the-Future-with-The-Hitchhikers-Guide-to-Notes-and-D...
 
call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️
call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️
call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️
 
CALL ON ➥8923113531 🔝Call Girls Kakori Lucknow best sexual service Online ☂️
CALL ON ➥8923113531 🔝Call Girls Kakori Lucknow best sexual service Online  ☂️CALL ON ➥8923113531 🔝Call Girls Kakori Lucknow best sexual service Online  ☂️
CALL ON ➥8923113531 🔝Call Girls Kakori Lucknow best sexual service Online ☂️
 
Unveiling the Tech Salsa of LAMs with Janus in Real-Time Applications
Unveiling the Tech Salsa of LAMs with Janus in Real-Time ApplicationsUnveiling the Tech Salsa of LAMs with Janus in Real-Time Applications
Unveiling the Tech Salsa of LAMs with Janus in Real-Time Applications
 
The Ultimate Test Automation Guide_ Best Practices and Tips.pdf
The Ultimate Test Automation Guide_ Best Practices and Tips.pdfThe Ultimate Test Automation Guide_ Best Practices and Tips.pdf
The Ultimate Test Automation Guide_ Best Practices and Tips.pdf
 
Reassessing the Bedrock of Clinical Function Models: An Examination of Large ...
Reassessing the Bedrock of Clinical Function Models: An Examination of Large ...Reassessing the Bedrock of Clinical Function Models: An Examination of Large ...
Reassessing the Bedrock of Clinical Function Models: An Examination of Large ...
 
5 Signs You Need a Fashion PLM Software.pdf
5 Signs You Need a Fashion PLM Software.pdf5 Signs You Need a Fashion PLM Software.pdf
5 Signs You Need a Fashion PLM Software.pdf
 
Hand gesture recognition PROJECT PPT.pptx
Hand gesture recognition PROJECT PPT.pptxHand gesture recognition PROJECT PPT.pptx
Hand gesture recognition PROJECT PPT.pptx
 

Git best practices for writing clean history

  • 2. Git / t/ɡɪ ”A silly,incompetent,stupid, annoying or childish person.” http://en.wiktionary.org/wiki/git
  • 3. "I'm an egotistical bastard,so I name all my projects after myself. First Linux,now Git” Linus Torvalds,PC World.2012-07-14
  • 4. Git popularity according to OpenHub.net
  • 5. Git popularity according to Google Trends git svn
  • 6. Why do we use git and version control at all? Because history matters.In societies,and in software projects too.History teaches where we came from and where we are going.
  • 7. Software is built patch by patch
  • 8. When a patch is committed to version control,it becomes a permanent part of history. Understanding the nature of a patch is required to make good git commits.
  • 9. A patch -attributes the author -has a title -may have a message -describes the lines added,removed and modified -the change is complete and self standing -e.g.fixes a defect or extends functionality
  • 10. You must master reading history before you can master writing it.If you think you can master writing history directly,you did not understand the nature of history at all.
  • 11. Browsing GitHub,Gitlab,git-web et cetera is good,but inspecting your local copy directly is best.
  • 16. Note the existing style.You need to write in the same language to be understood. Some universal rules apply,though.
  • 17. Universal git commit rules: -Start the title line with a capital letter just like in email -Don't end with a dot -Keep title under 72 characters (the Github limit) -Title is followed by one empty line,and then comes the description -The message part contains full sentences with ending dots etc -Use imperative format (Not 'Cleaned'but 'Clean up')
  • 18. Commit titles must look good in'git log --oneline' and complete the sentence'This change will..'
  • 19. Focus on describing WHY the change was made. The revision history diff will always show WHAT was changed.If your code is reviewed,the reviewer will focus on judging the rationale of the WHY and compare it to the WHAT to verify that they match. If it is later discovered that your code had a bug,the contents will be updated (WHAT) but the purpose of what it does will remain (WHY).
  • 20. The best and permanent place for code documentation is in inline comments.Don't repeat inline comments in the commit message. The commit message should focus on why the change was needed,while the inline comment documents the current version of the code.
  • 21. Is the change related to an issue or discussion available somewhere else? Include issue numbers and URLs in the commit message. Use trigger words like "Closes #123"to enable Github to make automatic links and update issues statuses.
  • 22. Work-in-progress commits Few people write the correct code in one go.Thus writing the correct git commit right away might not be possible. While developing,title the commits WIP,WIP2,WIP3 etc. When you are done,rebase and squash the changes into the final commits that constitute logical steps. git rebase -i master
  • 23. Other important tools to write history: git cherry-pick e413c6e git citool git citool --amend
  • 24. My favourite: git citool You can also spend all day writing code and at the end of the day save your work with 'git citool',where you can pick the hunks or lines that go together to form the commits.
  • 25. Are you committing somebody else's code? Mark authorship correctly: git commit -a --author "Dieter Adriaenssens <xxx@gmail.com>" git commit --amend --author="James Cowgill <xxx@debian.org>" git apply --author="Andreas Beckmann <xxx@debian.org>"/tmp/andreas.patch
  • 26. Branches A series of commits.The purpose of branches is to allow different versions of the software to exists in parallel. Typically there is a development master branch and a relase branch v1,which can evolve in separate directions. The master branch may become release v2 while the v1 branch may become release v1.1.
  • 27. All developers branch from master and then merge back. New releases branch from master. Support releases branch from release branch. Image source: http://tleyden.github.io/blog/2014/04/09/a-suc cessful-git-branching-model-with-enterprise-su pport/
  • 28. The holy master principle: Never break the master branch! All developers working to create new features or fix bugs use the current master branch as the base of their work. If the master is already broken,it will be difficult to fix the bug the developer intended to spend time fixing,or a new feature cannot be made to be functional if the starting point wasn't functional either.
  • 29. Git is a distributed version control system Every copy of the repository is a branch in itself.To share branches with others before they are merged to master, label the branch with a separate name. git checkout master git pull master git checkout -b feature-automatic-renewals git citool ... git push origin feature-automatic-renewals
  • 30. Apply the changes made by a collaborator: git pull http://people.debian.org/~sthibault/tmp/mariadb-10.0 feature-hurd After this your feature-hurd branch will have the same contents,and you can continue improving it. Many prefer to publish and pull via GitHub,but any server you can push files on with SSH and pull via SSH or HTTP will do.
  • 31. The holy QualityAssurance principle: all commits on master should go via review GitHub "Pull Requests"facilitate this. Gerrit and Gerrithub for more formal teams.
  • 32. Review principles: -Give feedback,even nitty gritty,to perfection the code (and documentation!). -Let the submitter fix it themselves,thus keeping authorship and commitment to maintaining the code. -Reviewing as an opportunity to learn.Both for the reviewee and reviewer!
  • 33. Review stalls (often,unfortunately): -Reviewer does not agree on the motivation to the change -Reviewer does not understand the contents of the changes -Poor documentation,unlogical commits -Lack of QA,no testcases,no external verification -Unfit change for the upcoming release,lack of time, wrong reviewer
  • 34. The holy history principle: never force push on master Except if you are really quick and sure that nobody made a git pull in between. If the rule is broken,developers and systems will have diverged versions of master,and everybody will need to do manual merges or dangerous force pulls.
  • 35. Remember: good outcomes require a lot of work Don't feel frustrated.The devil is often in the details and the nature of high quality code and reliable systems require diligent review. All big stable systems grew our of very small stable systems. Do not sacrifice stability for development velocity, otherwise it will just collect debt and require twice as much work later and grind development velocity to a full stop.
  • 36. The hotfix principle If you have blinking lights and sirens yelling, you can and should do whatever you need to.
  • 37. Beginner tips Learn the basics: http://try.github.com/ SSH-keys: https://help.github.com/articles/generating-ssh-keys/ Keep branch name visible in the bash prompt: https://github.com/ottok/tooling/blob/master/bashrc/bashrc.git
  • 38. Contact Seravo if you need experts in Linux,Git or other open source software Open seravo.fi See our blog for in-depth tips