SlideShare a Scribd company logo
WordCamp Norrköping August 28, 2015
Take the next step with git
OriginalAuthor/AwesomeProject MyGithubName/AwesomeProject
push
PathToMyRepo/AwesomeProject
pull
make
pull request
originupstream
the pull-request collaboration model
proposed by Vincent Driessen
 master and develop are long-lived branches
 feature-, release- and hotfix- branches gets
deleted when they are finished
 suitable for projects with traditional release
cycles and semantic versioning
git-flow
github flow
master
small-bugfix
awesome-feature
when deployment happens often
 master branch is always deployable
 all development happens in topic branches
 topic branches are verified before merging
 suitable for more agile environments with
shorter development cycles and regular
deployments
pull request is branch to branch
topic branches gets deleted after they are merged
work in topic branches - use pull requests
develop
initialize pull-request
my-feature →develop
my-feature
git log will show you the history
source: http://xkcd.com/1296/
write helpful commit messages
git commit -m “Fix login bug” Redirect user to the requested page after login
https://trello.com/path/to/relevant/card
Users were being redirected to the home page
after login. It is better to send them back to
the page they had originally requested before
they were redirected to the login form.
* Store requested path in a session variable
* Redirect to the stored location after
successfully logging in the user
vs
all the world is a stage
- first.php
- second.php*
- third.php
- assets
- first.js*
- second.css
- fourth.php
stagework commit
second.php
first.js
59ab5f84 Add awesome feature
add part of a file to the stage
[~/_gitrepos/wcnkpg2015] (develop *) $ git add -p
diff --git a/functions.php b/functions.php
index 3ccacf2..53a67e2 100644
--- a/functions.php
+++ b/functions.php
@@ -10,8 +10,32 @@
[big diff of all changes to the file]
Stage this hunk [y,n,q,a,d,/,s,e,?]? s
use ”git add -p” or ”git add --patch”
options
y - stage this hunk
n - do not stage this hunk
q - quit; do not stage this hunk or any of the remaining ones
a - stage this hunk and all later hunks in the file
d - do not stage this hunk or any of the later hunks in the file
/ - search for a hunk matching the given regex
s - split the current hunk into smaller hunks
e - manually edit the current hunk
? - print help
[~/_gitrepos/wcnkpg2015] (develop *+) $ git status
On branch develop
Changes to be committed:
(use “git reset HEAD <file>...” to unstage)
modified: functions.php
Changes not staged for commit:
(use “git add <file>...” to update what will be committed)
(use “git checkout -- <file>...” to discard changes in working directory)
modified: functions.php
[~/_gitrepos/wcnkpg2015] (develop *+) $ git commit
[develop 0337c46] Add theme setup scaffolding
1 file changed, 12 insertions(+)
[~/_gitrepos/wcnkpg2015] (develop *) $
review all changes staged for commit with
git status -v
or
git diff --staged
- first.php
- second.php*
- third.php
- assets
- first.js*
- second.css
- fourth.php
- fifth.php
- first.php
- second.php
- third.php
- assets
- first.js
- second.css
- fourth.php
- fifth.php
second.php
first.js
fifth.php
stage commit --amend
fifth.php
74c35a5f Add awesome feature
- first.php
- second.php*
- third.php
- assets
- first.js*
- second.css
- fourth.php
- fifth.php
stagework commit
second.php
first.js
second.php
first.js
59ab5f84 Add awesome feature
amend previous commit
the history has been changed
59ab5f84 Add awesome feature
74c35a5f Add awesome feature
before
after
rebase
develop
my-feature
master
develop
my-feature
git rebase develop
moves the base of the topic branch to develop
the commits are discarded and the patches
reapplied to the new branch, creating new commits
rebase vs merge
rebase
 use only on a short-lived local
topic branch
 makes the history cleaner
 will update your work to be
based on the latest upstream
development
merge
 when a branch has been shared
with other developers
 is non-destructive
 can make history harder to
follow if there are many merge
commits
summary
 choose and follow a branching strategy
 take advantage of the staging area
 be mindful of the history
 never rewrite history on shared branches
KARIN TALIGA
@_middlesister
�https://github.com/middlesister
invistruct.com
Thank you!
Ad

More Related Content

What's hot (20)

Git
GitGit
Git
Shinu Suresh
 
Undoing Things in Git
Undoing Things in GitUndoing Things in Git
Undoing Things in Git
gittower
 
Introduction to git and github
Introduction to git and githubIntroduction to git and github
Introduction to git and github
Aderemi Dadepo
 
A prentation on github
A prentation on githubA prentation on github
A prentation on github
Veronica Ojochona Michael (MCP)
 
Working in Team using Git in Unity
Working in Team using Git in UnityWorking in Team using Git in Unity
Working in Team using Git in Unity
Rifauddin Tsalitsy
 
Version Control Systems with git (and github) as an example
Version Control Systems with git (and github) as an exampleVersion Control Systems with git (and github) as an example
Version Control Systems with git (and github) as an example
Gaurav Kumar Garg
 
Advanced Git
Advanced GitAdvanced Git
Advanced Git
Sergiu-Ioan Ungur
 
The everyday developer's guide to version control with Git
The everyday developer's guide to version control with GitThe everyday developer's guide to version control with Git
The everyday developer's guide to version control with Git
E Carter
 
Git and GitHub
Git and GitHubGit and GitHub
Git and GitHub
Rick Umali
 
GitHub Presentation
GitHub PresentationGitHub Presentation
GitHub Presentation
BrianSchilder
 
Git flow cheatsheet
Git flow cheatsheetGit flow cheatsheet
Git flow cheatsheet
Funato Takashi
 
Git flow for daily use
Git flow for daily useGit flow for daily use
Git flow for daily use
Mediacurrent
 
Git workflows presentation
Git workflows presentationGit workflows presentation
Git workflows presentation
Mack Hardy
 
Git,Github,How to host using Github
Git,Github,How to host using GithubGit,Github,How to host using Github
Git,Github,How to host using Github
Sujata Regoti
 
Github
GithubGithub
Github
MeetPatel710
 
Git and github 101
Git and github 101Git and github 101
Git and github 101
Senthilkumar Gopal
 
Github git-cheat-sheet
Github git-cheat-sheetGithub git-cheat-sheet
Github git-cheat-sheet
Abdul Basit
 
Git Workflow With Gitflow
Git Workflow With GitflowGit Workflow With Gitflow
Git Workflow With Gitflow
Josh Dvir
 
Latex with git
Latex with gitLatex with git
Latex with git
sppmg
 
Git for beginners
Git for beginnersGit for beginners
Git for beginners
Arulmurugan Rajaraman
 
Undoing Things in Git
Undoing Things in GitUndoing Things in Git
Undoing Things in Git
gittower
 
Introduction to git and github
Introduction to git and githubIntroduction to git and github
Introduction to git and github
Aderemi Dadepo
 
Working in Team using Git in Unity
Working in Team using Git in UnityWorking in Team using Git in Unity
Working in Team using Git in Unity
Rifauddin Tsalitsy
 
Version Control Systems with git (and github) as an example
Version Control Systems with git (and github) as an exampleVersion Control Systems with git (and github) as an example
Version Control Systems with git (and github) as an example
Gaurav Kumar Garg
 
The everyday developer's guide to version control with Git
The everyday developer's guide to version control with GitThe everyday developer's guide to version control with Git
The everyday developer's guide to version control with Git
E Carter
 
Git and GitHub
Git and GitHubGit and GitHub
Git and GitHub
Rick Umali
 
Git flow for daily use
Git flow for daily useGit flow for daily use
Git flow for daily use
Mediacurrent
 
Git workflows presentation
Git workflows presentationGit workflows presentation
Git workflows presentation
Mack Hardy
 
Git,Github,How to host using Github
Git,Github,How to host using GithubGit,Github,How to host using Github
Git,Github,How to host using Github
Sujata Regoti
 
Github git-cheat-sheet
Github git-cheat-sheetGithub git-cheat-sheet
Github git-cheat-sheet
Abdul Basit
 
Git Workflow With Gitflow
Git Workflow With GitflowGit Workflow With Gitflow
Git Workflow With Gitflow
Josh Dvir
 
Latex with git
Latex with gitLatex with git
Latex with git
sppmg
 

Viewers also liked (20)

WordPress APIs
WordPress APIsWordPress APIs
WordPress APIs
Joseph Scott
 
Optimizing WordPress Performance
Optimizing WordPress PerformanceOptimizing WordPress Performance
Optimizing WordPress Performance
Douglas Yuen
 
BuddyPress Tips: How We Built chekmrk
BuddyPress Tips: How We Built chekmrkBuddyPress Tips: How We Built chekmrk
BuddyPress Tips: How We Built chekmrk
Wes Chyrchel
 
Debugging common errors in WordPress by Steve Mortiboy
Debugging common errors in WordPress by Steve MortiboyDebugging common errors in WordPress by Steve Mortiboy
Debugging common errors in WordPress by Steve Mortiboy
Steve Mortiboy
 
Rapid application development for WordPress using AWF
Rapid application development for WordPress using AWFRapid application development for WordPress using AWF
Rapid application development for WordPress using AWF
Tim Plummer
 
The WordPress Project; It's all about YOU!
The WordPress Project; It's all about YOU!The WordPress Project; It's all about YOU!
The WordPress Project; It's all about YOU!
Denise (Dee) Teal
 
Getting an eCommerce Site Running in 30 Minutes
Getting an eCommerce Site Running in 30 MinutesGetting an eCommerce Site Running in 30 Minutes
Getting an eCommerce Site Running in 30 Minutes
Apptivo
 
WordCamp 2015
WordCamp 2015WordCamp 2015
WordCamp 2015
Luiza Libardi
 
Website Security - It Begins With Good Posture
Website Security - It Begins With Good PostureWebsite Security - It Begins With Good Posture
Website Security - It Begins With Good Posture
Tony Perez
 
Quanto è sicuro il tuo wordpress?
Quanto è sicuro il tuo wordpress? Quanto è sicuro il tuo wordpress?
Quanto è sicuro il tuo wordpress?
GGDBologna
 
Understanding WordPress Filters and Actions
Understanding WordPress Filters and ActionsUnderstanding WordPress Filters and Actions
Understanding WordPress Filters and Actions
Ian Wilson
 
Cain & Obenland — Episode 4
Cain & Obenland — Episode 4Cain & Obenland — Episode 4
Cain & Obenland — Episode 4
Konstantin Obenland
 
Working Off Grid & Remote
Working Off Grid & RemoteWorking Off Grid & Remote
Working Off Grid & Remote
travistotz
 
Introduction to WordPress Multisite
Introduction to WordPress MultisiteIntroduction to WordPress Multisite
Introduction to WordPress Multisite
Craig Taylor
 
Future of WordPress in Nashville 2013
Future of WordPress in Nashville 2013Future of WordPress in Nashville 2013
Future of WordPress in Nashville 2013
John Housholder
 
Truly Dynamic Sidebars for WordPress
Truly Dynamic Sidebars for WordPressTruly Dynamic Sidebars for WordPress
Truly Dynamic Sidebars for WordPress
ednailor
 
Cómo crear plugins para Wordpress
Cómo crear plugins para WordpressCómo crear plugins para Wordpress
Cómo crear plugins para Wordpress
ralcocer
 
A house with no walls: Creating a site structure for the future
A house with no walls: Creating a site structure for the futureA house with no walls: Creating a site structure for the future
A house with no walls: Creating a site structure for the future
Gizmo Creative Factory, Inc.
 
Design and Development Techniques for Accessibility: WordCamp Tampa 2015
Design and Development Techniques for Accessibility: WordCamp Tampa 2015Design and Development Techniques for Accessibility: WordCamp Tampa 2015
Design and Development Techniques for Accessibility: WordCamp Tampa 2015
Robert Jolly
 
WordPress 101 - Foundation Friday at WordCamp Chicago 2014 #WCChi
WordPress 101 - Foundation Friday at WordCamp Chicago 2014 #WCChiWordPress 101 - Foundation Friday at WordCamp Chicago 2014 #WCChi
WordPress 101 - Foundation Friday at WordCamp Chicago 2014 #WCChi
Shanta Nathwani
 
Optimizing WordPress Performance
Optimizing WordPress PerformanceOptimizing WordPress Performance
Optimizing WordPress Performance
Douglas Yuen
 
BuddyPress Tips: How We Built chekmrk
BuddyPress Tips: How We Built chekmrkBuddyPress Tips: How We Built chekmrk
BuddyPress Tips: How We Built chekmrk
Wes Chyrchel
 
Debugging common errors in WordPress by Steve Mortiboy
Debugging common errors in WordPress by Steve MortiboyDebugging common errors in WordPress by Steve Mortiboy
Debugging common errors in WordPress by Steve Mortiboy
Steve Mortiboy
 
Rapid application development for WordPress using AWF
Rapid application development for WordPress using AWFRapid application development for WordPress using AWF
Rapid application development for WordPress using AWF
Tim Plummer
 
The WordPress Project; It's all about YOU!
The WordPress Project; It's all about YOU!The WordPress Project; It's all about YOU!
The WordPress Project; It's all about YOU!
Denise (Dee) Teal
 
Getting an eCommerce Site Running in 30 Minutes
Getting an eCommerce Site Running in 30 MinutesGetting an eCommerce Site Running in 30 Minutes
Getting an eCommerce Site Running in 30 Minutes
Apptivo
 
Website Security - It Begins With Good Posture
Website Security - It Begins With Good PostureWebsite Security - It Begins With Good Posture
Website Security - It Begins With Good Posture
Tony Perez
 
Quanto è sicuro il tuo wordpress?
Quanto è sicuro il tuo wordpress? Quanto è sicuro il tuo wordpress?
Quanto è sicuro il tuo wordpress?
GGDBologna
 
Understanding WordPress Filters and Actions
Understanding WordPress Filters and ActionsUnderstanding WordPress Filters and Actions
Understanding WordPress Filters and Actions
Ian Wilson
 
Working Off Grid & Remote
Working Off Grid & RemoteWorking Off Grid & Remote
Working Off Grid & Remote
travistotz
 
Introduction to WordPress Multisite
Introduction to WordPress MultisiteIntroduction to WordPress Multisite
Introduction to WordPress Multisite
Craig Taylor
 
Future of WordPress in Nashville 2013
Future of WordPress in Nashville 2013Future of WordPress in Nashville 2013
Future of WordPress in Nashville 2013
John Housholder
 
Truly Dynamic Sidebars for WordPress
Truly Dynamic Sidebars for WordPressTruly Dynamic Sidebars for WordPress
Truly Dynamic Sidebars for WordPress
ednailor
 
Cómo crear plugins para Wordpress
Cómo crear plugins para WordpressCómo crear plugins para Wordpress
Cómo crear plugins para Wordpress
ralcocer
 
A house with no walls: Creating a site structure for the future
A house with no walls: Creating a site structure for the futureA house with no walls: Creating a site structure for the future
A house with no walls: Creating a site structure for the future
Gizmo Creative Factory, Inc.
 
Design and Development Techniques for Accessibility: WordCamp Tampa 2015
Design and Development Techniques for Accessibility: WordCamp Tampa 2015Design and Development Techniques for Accessibility: WordCamp Tampa 2015
Design and Development Techniques for Accessibility: WordCamp Tampa 2015
Robert Jolly
 
WordPress 101 - Foundation Friday at WordCamp Chicago 2014 #WCChi
WordPress 101 - Foundation Friday at WordCamp Chicago 2014 #WCChiWordPress 101 - Foundation Friday at WordCamp Chicago 2014 #WCChi
WordPress 101 - Foundation Friday at WordCamp Chicago 2014 #WCChi
Shanta Nathwani
 
Ad

Similar to Take the next step with git (20)

Understanding about git
Understanding about gitUnderstanding about git
Understanding about git
Sothearin Ren
 
Git introduction
Git introductionGit introduction
Git introduction
satyendrajaladi
 
Git Distributed Version Control System
Git   Distributed Version Control SystemGit   Distributed Version Control System
Git Distributed Version Control System
Victor Wong
 
Contributing to Open Source with GitHub GDSC
Contributing to Open Source with GitHub GDSCContributing to Open Source with GitHub GDSC
Contributing to Open Source with GitHub GDSC
AyanMasood1
 
Mastering git - Workflow
Mastering git - WorkflowMastering git - Workflow
Mastering git - Workflow
Tahsin Abrar
 
git2.ppt
git2.pptgit2.ppt
git2.ppt
MohammadSamiuddin10
 
Phishing url detection: A real - case scenario through login URLs
Phishing url detection: A real - case scenario through login URLsPhishing url detection: A real - case scenario through login URLs
Phishing url detection: A real - case scenario through login URLs
dhanushalladi51
 
Git and github
Git and githubGit and github
Git and github
Teodora Ahkozidou
 
Git and Github
Git and GithubGit and Github
Git and Github
Teodora Ahkozidou
 
Git cheat sheet__grey
Git cheat sheet__greyGit cheat sheet__grey
Git cheat sheet__grey
King Hom
 
Git cheat sheet__white
Git cheat sheet__whiteGit cheat sheet__white
Git cheat sheet__white
King Hom
 
Git cheat sheet_dark
Git cheat sheet_darkGit cheat sheet_dark
Git cheat sheet_dark
King Hom
 
Git github
Git githubGit github
Git github
Anurag Deb
 
Git workflows automat-it
Git workflows automat-itGit workflows automat-it
Git workflows automat-it
Automat-IT
 
Advanced Git Techniques: Subtrees, Grafting, and Other Fun Stuff
Advanced Git Techniques: Subtrees, Grafting, and Other Fun StuffAdvanced Git Techniques: Subtrees, Grafting, and Other Fun Stuff
Advanced Git Techniques: Subtrees, Grafting, and Other Fun Stuff
Atlassian
 
Git 101
Git 101Git 101
Git 101
jayrparro
 
The journey to GitOps
The journey to GitOpsThe journey to GitOps
The journey to GitOps
Nicola Baldi
 
git2.ppt
git2.pptgit2.ppt
git2.ppt
ssusered2ec2
 
Git
GitGit
Git
Terry Wang
 
Git 入门与实践
Git 入门与实践Git 入门与实践
Git 入门与实践
Terry Wang
 
Understanding about git
Understanding about gitUnderstanding about git
Understanding about git
Sothearin Ren
 
Git Distributed Version Control System
Git   Distributed Version Control SystemGit   Distributed Version Control System
Git Distributed Version Control System
Victor Wong
 
Contributing to Open Source with GitHub GDSC
Contributing to Open Source with GitHub GDSCContributing to Open Source with GitHub GDSC
Contributing to Open Source with GitHub GDSC
AyanMasood1
 
Mastering git - Workflow
Mastering git - WorkflowMastering git - Workflow
Mastering git - Workflow
Tahsin Abrar
 
Phishing url detection: A real - case scenario through login URLs
Phishing url detection: A real - case scenario through login URLsPhishing url detection: A real - case scenario through login URLs
Phishing url detection: A real - case scenario through login URLs
dhanushalladi51
 
Git cheat sheet__grey
Git cheat sheet__greyGit cheat sheet__grey
Git cheat sheet__grey
King Hom
 
Git cheat sheet__white
Git cheat sheet__whiteGit cheat sheet__white
Git cheat sheet__white
King Hom
 
Git cheat sheet_dark
Git cheat sheet_darkGit cheat sheet_dark
Git cheat sheet_dark
King Hom
 
Git workflows automat-it
Git workflows automat-itGit workflows automat-it
Git workflows automat-it
Automat-IT
 
Advanced Git Techniques: Subtrees, Grafting, and Other Fun Stuff
Advanced Git Techniques: Subtrees, Grafting, and Other Fun StuffAdvanced Git Techniques: Subtrees, Grafting, and Other Fun Stuff
Advanced Git Techniques: Subtrees, Grafting, and Other Fun Stuff
Atlassian
 
The journey to GitOps
The journey to GitOpsThe journey to GitOps
The journey to GitOps
Nicola Baldi
 
Git 入门与实践
Git 入门与实践Git 入门与实践
Git 入门与实践
Terry Wang
 
Ad

Recently uploaded (20)

Massive Power Outage Hits Spain, Portugal, and France: Causes, Impact, and On...
Massive Power Outage Hits Spain, Portugal, and France: Causes, Impact, and On...Massive Power Outage Hits Spain, Portugal, and France: Causes, Impact, and On...
Massive Power Outage Hits Spain, Portugal, and France: Causes, Impact, and On...
Aqusag Technologies
 
UiPath Community Berlin: Orchestrator API, Swagger, and Test Manager API
UiPath Community Berlin: Orchestrator API, Swagger, and Test Manager APIUiPath Community Berlin: Orchestrator API, Swagger, and Test Manager API
UiPath Community Berlin: Orchestrator API, Swagger, and Test Manager API
UiPathCommunity
 
AI Changes Everything – Talk at Cardiff Metropolitan University, 29th April 2...
AI Changes Everything – Talk at Cardiff Metropolitan University, 29th April 2...AI Changes Everything – Talk at Cardiff Metropolitan University, 29th April 2...
AI Changes Everything – Talk at Cardiff Metropolitan University, 29th April 2...
Alan Dix
 
Andrew Marnell: Transforming Business Strategy Through Data-Driven Insights
Andrew Marnell: Transforming Business Strategy Through Data-Driven InsightsAndrew Marnell: Transforming Business Strategy Through Data-Driven Insights
Andrew Marnell: Transforming Business Strategy Through Data-Driven Insights
Andrew Marnell
 
#StandardsGoals for 2025: Standards & certification roundup - Tech Forum 2025
#StandardsGoals for 2025: Standards & certification roundup - Tech Forum 2025#StandardsGoals for 2025: Standards & certification roundup - Tech Forum 2025
#StandardsGoals for 2025: Standards & certification roundup - Tech Forum 2025
BookNet Canada
 
Big Data Analytics Quick Research Guide by Arthur Morgan
Big Data Analytics Quick Research Guide by Arthur MorganBig Data Analytics Quick Research Guide by Arthur Morgan
Big Data Analytics Quick Research Guide by Arthur Morgan
Arthur Morgan
 
Greenhouse_Monitoring_Presentation.pptx.
Greenhouse_Monitoring_Presentation.pptx.Greenhouse_Monitoring_Presentation.pptx.
Greenhouse_Monitoring_Presentation.pptx.
hpbmnnxrvb
 
IEDM 2024 Tutorial2_Advances in CMOS Technologies and Future Directions for C...
IEDM 2024 Tutorial2_Advances in CMOS Technologies and Future Directions for C...IEDM 2024 Tutorial2_Advances in CMOS Technologies and Future Directions for C...
IEDM 2024 Tutorial2_Advances in CMOS Technologies and Future Directions for C...
organizerofv
 
Enhancing ICU Intelligence: How Our Functional Testing Enabled a Healthcare I...
Enhancing ICU Intelligence: How Our Functional Testing Enabled a Healthcare I...Enhancing ICU Intelligence: How Our Functional Testing Enabled a Healthcare I...
Enhancing ICU Intelligence: How Our Functional Testing Enabled a Healthcare I...
Impelsys Inc.
 
TrustArc Webinar: Consumer Expectations vs Corporate Realities on Data Broker...
TrustArc Webinar: Consumer Expectations vs Corporate Realities on Data Broker...TrustArc Webinar: Consumer Expectations vs Corporate Realities on Data Broker...
TrustArc Webinar: Consumer Expectations vs Corporate Realities on Data Broker...
TrustArc
 
What is Model Context Protocol(MCP) - The new technology for communication bw...
What is Model Context Protocol(MCP) - The new technology for communication bw...What is Model Context Protocol(MCP) - The new technology for communication bw...
What is Model Context Protocol(MCP) - The new technology for communication bw...
Vishnu Singh Chundawat
 
Generative Artificial Intelligence (GenAI) in Business
Generative Artificial Intelligence (GenAI) in BusinessGenerative Artificial Intelligence (GenAI) in Business
Generative Artificial Intelligence (GenAI) in Business
Dr. Tathagat Varma
 
AI EngineHost Review: Revolutionary USA Datacenter-Based Hosting with NVIDIA ...
AI EngineHost Review: Revolutionary USA Datacenter-Based Hosting with NVIDIA ...AI EngineHost Review: Revolutionary USA Datacenter-Based Hosting with NVIDIA ...
AI EngineHost Review: Revolutionary USA Datacenter-Based Hosting with NVIDIA ...
SOFTTECHHUB
 
Manifest Pre-Seed Update | A Humanoid OEM Deeptech In France
Manifest Pre-Seed Update | A Humanoid OEM Deeptech In FranceManifest Pre-Seed Update | A Humanoid OEM Deeptech In France
Manifest Pre-Seed Update | A Humanoid OEM Deeptech In France
chb3
 
Splunk Security Update | Public Sector Summit Germany 2025
Splunk Security Update | Public Sector Summit Germany 2025Splunk Security Update | Public Sector Summit Germany 2025
Splunk Security Update | Public Sector Summit Germany 2025
Splunk
 
Designing Low-Latency Systems with Rust and ScyllaDB: An Architectural Deep Dive
Designing Low-Latency Systems with Rust and ScyllaDB: An Architectural Deep DiveDesigning Low-Latency Systems with Rust and ScyllaDB: An Architectural Deep Dive
Designing Low-Latency Systems with Rust and ScyllaDB: An Architectural Deep Dive
ScyllaDB
 
SAP Modernization: Maximizing the Value of Your SAP S/4HANA Migration.pdf
SAP Modernization: Maximizing the Value of Your SAP S/4HANA Migration.pdfSAP Modernization: Maximizing the Value of Your SAP S/4HANA Migration.pdf
SAP Modernization: Maximizing the Value of Your SAP S/4HANA Migration.pdf
Precisely
 
Heap, Types of Heap, Insertion and Deletion
Heap, Types of Heap, Insertion and DeletionHeap, Types of Heap, Insertion and Deletion
Heap, Types of Heap, Insertion and Deletion
Jaydeep Kale
 
Linux Professional Institute LPIC-1 Exam.pdf
Linux Professional Institute LPIC-1 Exam.pdfLinux Professional Institute LPIC-1 Exam.pdf
Linux Professional Institute LPIC-1 Exam.pdf
RHCSA Guru
 
tecnologias de las primeras civilizaciones.pdf
tecnologias de las primeras civilizaciones.pdftecnologias de las primeras civilizaciones.pdf
tecnologias de las primeras civilizaciones.pdf
fjgm517
 
Massive Power Outage Hits Spain, Portugal, and France: Causes, Impact, and On...
Massive Power Outage Hits Spain, Portugal, and France: Causes, Impact, and On...Massive Power Outage Hits Spain, Portugal, and France: Causes, Impact, and On...
Massive Power Outage Hits Spain, Portugal, and France: Causes, Impact, and On...
Aqusag Technologies
 
UiPath Community Berlin: Orchestrator API, Swagger, and Test Manager API
UiPath Community Berlin: Orchestrator API, Swagger, and Test Manager APIUiPath Community Berlin: Orchestrator API, Swagger, and Test Manager API
UiPath Community Berlin: Orchestrator API, Swagger, and Test Manager API
UiPathCommunity
 
AI Changes Everything – Talk at Cardiff Metropolitan University, 29th April 2...
AI Changes Everything – Talk at Cardiff Metropolitan University, 29th April 2...AI Changes Everything – Talk at Cardiff Metropolitan University, 29th April 2...
AI Changes Everything – Talk at Cardiff Metropolitan University, 29th April 2...
Alan Dix
 
Andrew Marnell: Transforming Business Strategy Through Data-Driven Insights
Andrew Marnell: Transforming Business Strategy Through Data-Driven InsightsAndrew Marnell: Transforming Business Strategy Through Data-Driven Insights
Andrew Marnell: Transforming Business Strategy Through Data-Driven Insights
Andrew Marnell
 
#StandardsGoals for 2025: Standards & certification roundup - Tech Forum 2025
#StandardsGoals for 2025: Standards & certification roundup - Tech Forum 2025#StandardsGoals for 2025: Standards & certification roundup - Tech Forum 2025
#StandardsGoals for 2025: Standards & certification roundup - Tech Forum 2025
BookNet Canada
 
Big Data Analytics Quick Research Guide by Arthur Morgan
Big Data Analytics Quick Research Guide by Arthur MorganBig Data Analytics Quick Research Guide by Arthur Morgan
Big Data Analytics Quick Research Guide by Arthur Morgan
Arthur Morgan
 
Greenhouse_Monitoring_Presentation.pptx.
Greenhouse_Monitoring_Presentation.pptx.Greenhouse_Monitoring_Presentation.pptx.
Greenhouse_Monitoring_Presentation.pptx.
hpbmnnxrvb
 
IEDM 2024 Tutorial2_Advances in CMOS Technologies and Future Directions for C...
IEDM 2024 Tutorial2_Advances in CMOS Technologies and Future Directions for C...IEDM 2024 Tutorial2_Advances in CMOS Technologies and Future Directions for C...
IEDM 2024 Tutorial2_Advances in CMOS Technologies and Future Directions for C...
organizerofv
 
Enhancing ICU Intelligence: How Our Functional Testing Enabled a Healthcare I...
Enhancing ICU Intelligence: How Our Functional Testing Enabled a Healthcare I...Enhancing ICU Intelligence: How Our Functional Testing Enabled a Healthcare I...
Enhancing ICU Intelligence: How Our Functional Testing Enabled a Healthcare I...
Impelsys Inc.
 
TrustArc Webinar: Consumer Expectations vs Corporate Realities on Data Broker...
TrustArc Webinar: Consumer Expectations vs Corporate Realities on Data Broker...TrustArc Webinar: Consumer Expectations vs Corporate Realities on Data Broker...
TrustArc Webinar: Consumer Expectations vs Corporate Realities on Data Broker...
TrustArc
 
What is Model Context Protocol(MCP) - The new technology for communication bw...
What is Model Context Protocol(MCP) - The new technology for communication bw...What is Model Context Protocol(MCP) - The new technology for communication bw...
What is Model Context Protocol(MCP) - The new technology for communication bw...
Vishnu Singh Chundawat
 
Generative Artificial Intelligence (GenAI) in Business
Generative Artificial Intelligence (GenAI) in BusinessGenerative Artificial Intelligence (GenAI) in Business
Generative Artificial Intelligence (GenAI) in Business
Dr. Tathagat Varma
 
AI EngineHost Review: Revolutionary USA Datacenter-Based Hosting with NVIDIA ...
AI EngineHost Review: Revolutionary USA Datacenter-Based Hosting with NVIDIA ...AI EngineHost Review: Revolutionary USA Datacenter-Based Hosting with NVIDIA ...
AI EngineHost Review: Revolutionary USA Datacenter-Based Hosting with NVIDIA ...
SOFTTECHHUB
 
Manifest Pre-Seed Update | A Humanoid OEM Deeptech In France
Manifest Pre-Seed Update | A Humanoid OEM Deeptech In FranceManifest Pre-Seed Update | A Humanoid OEM Deeptech In France
Manifest Pre-Seed Update | A Humanoid OEM Deeptech In France
chb3
 
Splunk Security Update | Public Sector Summit Germany 2025
Splunk Security Update | Public Sector Summit Germany 2025Splunk Security Update | Public Sector Summit Germany 2025
Splunk Security Update | Public Sector Summit Germany 2025
Splunk
 
Designing Low-Latency Systems with Rust and ScyllaDB: An Architectural Deep Dive
Designing Low-Latency Systems with Rust and ScyllaDB: An Architectural Deep DiveDesigning Low-Latency Systems with Rust and ScyllaDB: An Architectural Deep Dive
Designing Low-Latency Systems with Rust and ScyllaDB: An Architectural Deep Dive
ScyllaDB
 
SAP Modernization: Maximizing the Value of Your SAP S/4HANA Migration.pdf
SAP Modernization: Maximizing the Value of Your SAP S/4HANA Migration.pdfSAP Modernization: Maximizing the Value of Your SAP S/4HANA Migration.pdf
SAP Modernization: Maximizing the Value of Your SAP S/4HANA Migration.pdf
Precisely
 
Heap, Types of Heap, Insertion and Deletion
Heap, Types of Heap, Insertion and DeletionHeap, Types of Heap, Insertion and Deletion
Heap, Types of Heap, Insertion and Deletion
Jaydeep Kale
 
Linux Professional Institute LPIC-1 Exam.pdf
Linux Professional Institute LPIC-1 Exam.pdfLinux Professional Institute LPIC-1 Exam.pdf
Linux Professional Institute LPIC-1 Exam.pdf
RHCSA Guru
 
tecnologias de las primeras civilizaciones.pdf
tecnologias de las primeras civilizaciones.pdftecnologias de las primeras civilizaciones.pdf
tecnologias de las primeras civilizaciones.pdf
fjgm517
 

Take the next step with git

  • 1. WordCamp Norrköping August 28, 2015 Take the next step with git
  • 3. proposed by Vincent Driessen  master and develop are long-lived branches  feature-, release- and hotfix- branches gets deleted when they are finished  suitable for projects with traditional release cycles and semantic versioning git-flow
  • 4. github flow master small-bugfix awesome-feature when deployment happens often  master branch is always deployable  all development happens in topic branches  topic branches are verified before merging  suitable for more agile environments with shorter development cycles and regular deployments
  • 5. pull request is branch to branch topic branches gets deleted after they are merged work in topic branches - use pull requests develop initialize pull-request my-feature →develop my-feature
  • 6. git log will show you the history source: http://xkcd.com/1296/
  • 7. write helpful commit messages git commit -m “Fix login bug” Redirect user to the requested page after login https://trello.com/path/to/relevant/card Users were being redirected to the home page after login. It is better to send them back to the page they had originally requested before they were redirected to the login form. * Store requested path in a session variable * Redirect to the stored location after successfully logging in the user vs
  • 8. all the world is a stage - first.php - second.php* - third.php - assets - first.js* - second.css - fourth.php stagework commit second.php first.js 59ab5f84 Add awesome feature
  • 9. add part of a file to the stage [~/_gitrepos/wcnkpg2015] (develop *) $ git add -p diff --git a/functions.php b/functions.php index 3ccacf2..53a67e2 100644 --- a/functions.php +++ b/functions.php @@ -10,8 +10,32 @@ [big diff of all changes to the file] Stage this hunk [y,n,q,a,d,/,s,e,?]? s use ”git add -p” or ”git add --patch”
  • 10. options y - stage this hunk n - do not stage this hunk q - quit; do not stage this hunk or any of the remaining ones a - stage this hunk and all later hunks in the file d - do not stage this hunk or any of the later hunks in the file / - search for a hunk matching the given regex s - split the current hunk into smaller hunks e - manually edit the current hunk ? - print help
  • 11. [~/_gitrepos/wcnkpg2015] (develop *+) $ git status On branch develop Changes to be committed: (use “git reset HEAD <file>...” to unstage) modified: functions.php Changes not staged for commit: (use “git add <file>...” to update what will be committed) (use “git checkout -- <file>...” to discard changes in working directory) modified: functions.php [~/_gitrepos/wcnkpg2015] (develop *+) $ git commit [develop 0337c46] Add theme setup scaffolding 1 file changed, 12 insertions(+) [~/_gitrepos/wcnkpg2015] (develop *) $ review all changes staged for commit with git status -v or git diff --staged
  • 12. - first.php - second.php* - third.php - assets - first.js* - second.css - fourth.php - fifth.php - first.php - second.php - third.php - assets - first.js - second.css - fourth.php - fifth.php second.php first.js fifth.php stage commit --amend fifth.php 74c35a5f Add awesome feature - first.php - second.php* - third.php - assets - first.js* - second.css - fourth.php - fifth.php stagework commit second.php first.js second.php first.js 59ab5f84 Add awesome feature amend previous commit
  • 13. the history has been changed 59ab5f84 Add awesome feature 74c35a5f Add awesome feature before after
  • 14. rebase develop my-feature master develop my-feature git rebase develop moves the base of the topic branch to develop the commits are discarded and the patches reapplied to the new branch, creating new commits
  • 15. rebase vs merge rebase  use only on a short-lived local topic branch  makes the history cleaner  will update your work to be based on the latest upstream development merge  when a branch has been shared with other developers  is non-destructive  can make history harder to follow if there are many merge commits
  • 16. summary  choose and follow a branching strategy  take advantage of the staging area  be mindful of the history  never rewrite history on shared branches