SlideShare una empresa de Scribd logo
1 de 40
Descargar para leer sin conexión
Git for Joomla! development
+
BLOG:Email: me@phproberto.com
About me
● PLT member
● CMS contributor
● JBS & JSST member
● PHP & JS developer
● Freelance
Twitter: @phproberto
What is git?
● Distributed Version Control System (DVCS)
● Compatible with all OS
● For team or single developers
● Record changes to files
● Revert files back
● Review changes over time
● See who changed what?
● Detect issue source
Version Control Systems
Nothing Copy & Paste Local VCS CVCS DVCS
Distributed Version Control Systems
● Easier to setup
● Less data loss risk
● Review changes locally
● Better speed
● Dev. Independency
DVCS benefits:
github
● Extend functionalities
● Save server management
● Visual interface
● Search issues / Google
● Comments
● Tag issues
● Stats
● Credits
● Integrations (Travis, Jenkins..)
git & Joomla!
● Required to contribute
● joomla/joomla-cms -> CMS
● joomla-framework -> Framework
● joomla-extensions -> Utilities
● joomla-cms -> Light core
● joomla-projects -> Parallel projects
Desired schema
local fork
upstream origin Your forkMain repo
Fork CMS repository
Fork view + clone URL
The terminal!
Why use terminal
● It works on all OS
● You end using it anyway
● You understand git
● You see cli output
git aliases
https://gist.github.com/phproberto/5066462
Clone fork locally
git clone {fork-url}
Upstream server
Add upstream server
git remote add upstream {upstream-url}
git branches
http://git-scm.com/book/en/Git-Branching-What-a-Branch-Is
git branch / git br
http://git-scm.com/book/en/Git-Branching-Branching-Workflows
git branch cool-branch
Create a branch:
Create and enter in a branch:
git checkout -b cool-branch
Delete a merged branch:
git branch -d cool-branch
Delete branches even not merged:
git branch -D cool-branch
Default list branches
git merge
http://git-scm.com/book/en/Git-Branching-Branching-Workflows
Keep your main branch clean
● Usually “master” branch
● CMS uses “staging”
● git-3.x-dev for features
git fetch vs git pull
git fetch upstream
git merge upstream/staging
git fetch = download local copy
git pull upstream staging
git pull download and merge remote content
merge manually
git log
git l (custom alias)
git log tricks
git l libraries/joomla/form/field.php
log for a specific file/folder:
search commits from one user:
git l --author=”Roberto”
search in commits messages
git l --grep=”internet explorer”
git status
Staging
Your first commit
Ensure that you are in a clean (and updated) branch
git checkout staging
Create a new branch:
git checkout -b fields-error
{edit files on your IDE}
Staging files:
git add templates
git add tricks
Add all files:
git add -A
Add only new files:
git add .
Add only modified files:
git add -u
Committing changes
Commit staged changes:
git commit -m ‘[imp] Code style fixes’
Always review status:
git status
Undo last commit without losing changes:
Amend files to last commit:
git commit --amend -C HEAD (alias “git amend”)
git reset --soft HEAD^ (alias “git undolast”)
Push branch to your fork
git push origin fields-error
local fork
upstream origin
Your forkMain repo
fields-error
Create a pull request
Pull request message
● Informative title
● Describe the issue
● Add screenshots (it’s free!)
● Add testing instructions
● Document features
● Comment if it’s a WIP
● Mention people if you need
help
Pull request code
● Always review code!
● Avoid 10 commits for 10
lines (squash)
● Github Coding Standards
● Add minified/unminified
assets
● Compile LESS
Be open to critique
● Improve as developer
● Avoid being blamed
● People invests time on you
● Ask help / guidance
● Learn for free!
Keep your PR up to date
● Add commits locally and push
● Rebase before pushing
● Squash if needed
git rebase
http://git-scm.com/book/en/Git-Branching-Rebasing
git rebase upstream/staging
git push origin fields-error --force
git rebase
http://git-scm.com/book/en/Git-Branching-Rebasing
NEVER rebase a collaborative branch!
Squash commits
git rebase -i staging
Squash commits
Result:
Questions?
Thanks for watching

Más contenido relacionado

La actualidad más candente

La actualidad más candente (20)

Difference between gitlab vs github vs bitbucket
Difference between gitlab vs github vs bitbucketDifference between gitlab vs github vs bitbucket
Difference between gitlab vs github vs bitbucket
 
Git and GitHub
Git and GitHubGit and GitHub
Git and GitHub
 
Git and git workflow best practice
Git and git workflow best practiceGit and git workflow best practice
Git and git workflow best practice
 
Introduction to Git / Github
Introduction to Git / GithubIntroduction to Git / Github
Introduction to Git / Github
 
Git basics
Git basicsGit basics
Git basics
 
COSCUP 2016: Project 52 每週一個小專案來學習 Golang
COSCUP 2016: Project 52 每週一個小專案來學習 GolangCOSCUP 2016: Project 52 每週一個小專案來學習 Golang
COSCUP 2016: Project 52 每週一個小專案來學習 Golang
 
Advanced Git Presentation By Swawibe
Advanced Git Presentation By SwawibeAdvanced Git Presentation By Swawibe
Advanced Git Presentation By Swawibe
 
Git and Github workshop
Git and Github workshopGit and Github workshop
Git and Github workshop
 
Github 101 An Adventurer's Guide To Open Source
Github 101   An Adventurer's Guide To Open SourceGithub 101   An Adventurer's Guide To Open Source
Github 101 An Adventurer's Guide To Open Source
 
Git best practices 2016
Git best practices 2016Git best practices 2016
Git best practices 2016
 
Introduction to Git and GitHub
Introduction to Git and GitHubIntroduction to Git and GitHub
Introduction to Git and GitHub
 
Git Basics Philips
Git Basics PhilipsGit Basics Philips
Git Basics Philips
 
Git for Beginners
Git for BeginnersGit for Beginners
Git for Beginners
 
Git and Github
Git and GithubGit and Github
Git and Github
 
HTTP / 1, HTTP / 2 and HTTP / 3: Past, present and the future of APIs
HTTP / 1, HTTP / 2 and HTTP / 3: Past, present and the future of APIsHTTP / 1, HTTP / 2 and HTTP / 3: Past, present and the future of APIs
HTTP / 1, HTTP / 2 and HTTP / 3: Past, present and the future of APIs
 
Learn Git Basics
Learn Git BasicsLearn Git Basics
Learn Git Basics
 
Git workflow in agile development
Git workflow in agile developmentGit workflow in agile development
Git workflow in agile development
 
Git training
Git trainingGit training
Git training
 
Github
GithubGithub
Github
 
Github - Git Training Slides: Foundations
Github - Git Training Slides: FoundationsGithub - Git Training Slides: Foundations
Github - Git Training Slides: Foundations
 

Destacado

Data Geeks Rejoice: Luminate Online Benchmark Study 2014
Data Geeks Rejoice: Luminate Online Benchmark Study 2014Data Geeks Rejoice: Luminate Online Benchmark Study 2014
Data Geeks Rejoice: Luminate Online Benchmark Study 2014
Blackbaud
 
Dinamicagrupos
DinamicagruposDinamicagrupos
Dinamicagrupos
JCCM
 
Faculty Development HSG Entwicklungsprozess
Faculty Development HSG EntwicklungsprozessFaculty Development HSG Entwicklungsprozess
Faculty Development HSG Entwicklungsprozess
hse_unisg
 
Web 1 0_2_0_3_0_y_4_0
Web 1 0_2_0_3_0_y_4_0Web 1 0_2_0_3_0_y_4_0
Web 1 0_2_0_3_0_y_4_0
Noebulldog
 
Protocolo traslados via ugcc
Protocolo traslados via ugccProtocolo traslados via ugcc
Protocolo traslados via ugcc
SSMN
 

Destacado (20)

Git.odp 0
Git.odp 0Git.odp 0
Git.odp 0
 
Perforce on Tour 2015 - DVCS in the Enterprise: Introducing Helix DVCS and Gi...
Perforce on Tour 2015 - DVCS in the Enterprise: Introducing Helix DVCS and Gi...Perforce on Tour 2015 - DVCS in the Enterprise: Introducing Helix DVCS and Gi...
Perforce on Tour 2015 - DVCS in the Enterprise: Introducing Helix DVCS and Gi...
 
Git tutorial
Git tutorialGit tutorial
Git tutorial
 
Contagem-Edição Contagem 33/2
Contagem-Edição Contagem  33/2Contagem-Edição Contagem  33/2
Contagem-Edição Contagem 33/2
 
Laundry Boy
Laundry BoyLaundry Boy
Laundry Boy
 
Traducciones agora fs
Traducciones agora fsTraducciones agora fs
Traducciones agora fs
 
Amor y sexualidad
Amor y sexualidadAmor y sexualidad
Amor y sexualidad
 
Esquema Nacional de Seguridad
Esquema Nacional de SeguridadEsquema Nacional de Seguridad
Esquema Nacional de Seguridad
 
Gacetilla nº 20. junio 2016.Pereda_Leganés
Gacetilla nº 20. junio 2016.Pereda_LeganésGacetilla nº 20. junio 2016.Pereda_Leganés
Gacetilla nº 20. junio 2016.Pereda_Leganés
 
Data Geeks Rejoice: Luminate Online Benchmark Study 2014
Data Geeks Rejoice: Luminate Online Benchmark Study 2014Data Geeks Rejoice: Luminate Online Benchmark Study 2014
Data Geeks Rejoice: Luminate Online Benchmark Study 2014
 
Dinamicagrupos
DinamicagruposDinamicagrupos
Dinamicagrupos
 
Faculty Development HSG Entwicklungsprozess
Faculty Development HSG EntwicklungsprozessFaculty Development HSG Entwicklungsprozess
Faculty Development HSG Entwicklungsprozess
 
Energia solar
Energia solarEnergia solar
Energia solar
 
Web 1 0_2_0_3_0_y_4_0
Web 1 0_2_0_3_0_y_4_0Web 1 0_2_0_3_0_y_4_0
Web 1 0_2_0_3_0_y_4_0
 
Protocolo traslados via ugcc
Protocolo traslados via ugccProtocolo traslados via ugcc
Protocolo traslados via ugcc
 
Sexualidad-1
Sexualidad-1Sexualidad-1
Sexualidad-1
 
Soil survey the quest for precision agriculture in bangladesh
Soil survey the quest for precision agriculture in bangladeshSoil survey the quest for precision agriculture in bangladesh
Soil survey the quest for precision agriculture in bangladesh
 
SaaS Cloud Computing Solutions-as-a-Service - Convention des Décideurs IBM - ...
SaaS Cloud Computing Solutions-as-a-Service - Convention des Décideurs IBM - ...SaaS Cloud Computing Solutions-as-a-Service - Convention des Décideurs IBM - ...
SaaS Cloud Computing Solutions-as-a-Service - Convention des Décideurs IBM - ...
 
Cubismo
CubismoCubismo
Cubismo
 
Enabling Smarter Cities through Internet of Things, Web of Data & Citizen Par...
Enabling Smarter Cities through Internet of Things, Web of Data & Citizen Par...Enabling Smarter Cities through Internet of Things, Web of Data & Citizen Par...
Enabling Smarter Cities through Internet of Things, Web of Data & Citizen Par...
 

Similar a Git for joomla! development #JAB14

Git 入门与实践
Git 入门与实践Git 入门与实践
Git 入门与实践
Terry Wang
 
Git 入门 与 实践
Git 入门 与 实践Git 入门 与 实践
Git 入门 与 实践
Terry Wang
 
2015-ghci-presentation-git_gerritJenkins_final
2015-ghci-presentation-git_gerritJenkins_final2015-ghci-presentation-git_gerritJenkins_final
2015-ghci-presentation-git_gerritJenkins_final
Mythri P K
 

Similar a Git for joomla! development #JAB14 (20)

Introduction to Git and Github
Introduction to Git and Github Introduction to Git and Github
Introduction to Git and Github
 
introduction in version control system
introduction in version control systemintroduction in version control system
introduction in version control system
 
Git and Github workshop GDSC MLRITM
Git and Github  workshop GDSC MLRITMGit and Github  workshop GDSC MLRITM
Git and Github workshop GDSC MLRITM
 
git2.ppt
git2.pptgit2.ppt
git2.ppt
 
Demystifying Git
Demystifying GitDemystifying Git
Demystifying Git
 
Demystifying Git
Demystifying GitDemystifying Git
Demystifying Git
 
Git installation and configuration
Git installation and configurationGit installation and configuration
Git installation and configuration
 
Git 入门与实践
Git 入门与实践Git 入门与实践
Git 入门与实践
 
Git
GitGit
Git
 
Git with the flow
Git with the flowGit with the flow
Git with the flow
 
Git 入门 与 实践
Git 入门 与 实践Git 入门 与 实践
Git 入门 与 实践
 
Introduction to Git
Introduction to GitIntroduction to Git
Introduction to Git
 
git2.ppt
git2.pptgit2.ppt
git2.ppt
 
2015-ghci-presentation-git_gerritJenkins_final
2015-ghci-presentation-git_gerritJenkins_final2015-ghci-presentation-git_gerritJenkins_final
2015-ghci-presentation-git_gerritJenkins_final
 
Git hub
Git hubGit hub
Git hub
 
You're doing it wrong! Git it right!
You're doing it wrong! Git it right!You're doing it wrong! Git it right!
You're doing it wrong! Git it right!
 
Git - An Introduction
Git - An IntroductionGit - An Introduction
Git - An Introduction
 
Introduction To Git Workshop
Introduction To Git WorkshopIntroduction To Git Workshop
Introduction To Git Workshop
 
Git introduction
Git introductionGit introduction
Git introduction
 
Git and Github - A primer
Git and Github - A primerGit and Github - A primer
Git and Github - A primer
 

Más de Roberto Segura

Más de Roberto Segura (10)

Using twig as rendering system for your Joomla extensions
Using twig as rendering system for your Joomla extensionsUsing twig as rendering system for your Joomla extensions
Using twig as rendering system for your Joomla extensions
 
TDD for joomla extensions
TDD for joomla extensionsTDD for joomla extensions
TDD for joomla extensions
 
Joomla Entity - API semántica para Joomla
Joomla Entity - API semántica para JoomlaJoomla Entity - API semántica para Joomla
Joomla Entity - API semántica para Joomla
 
Uso de tecnologías modernas en joomla
Uso de tecnologías modernas en joomlaUso de tecnologías modernas en joomla
Uso de tecnologías modernas en joomla
 
JLayout for extension developers
JLayout for extension developersJLayout for extension developers
JLayout for extension developers
 
Plugin para-joomla-45-minutos
Plugin para-joomla-45-minutosPlugin para-joomla-45-minutos
Plugin para-joomla-45-minutos
 
Introducción a la programación para joomla
Introducción a la programación para joomlaIntroducción a la programación para joomla
Introducción a la programación para joomla
 
Joomla JLayout
Joomla JLayout Joomla JLayout
Joomla JLayout
 
Joomla! future #jd14fr keynote
Joomla! future #jd14fr keynoteJoomla! future #jd14fr keynote
Joomla! future #jd14fr keynote
 
Introduccción a la programación en Joomla!
Introduccción a la programación en Joomla!Introduccción a la programación en Joomla!
Introduccción a la programación en Joomla!
 

Último

TECUNIQUE: Success Stories: IT Service provider
TECUNIQUE: Success Stories: IT Service providerTECUNIQUE: Success Stories: IT Service provider
TECUNIQUE: Success Stories: IT Service provider
mohitmore19
 
+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
 
AI Mastery 201: Elevating Your Workflow with Advanced LLM Techniques
AI Mastery 201: Elevating Your Workflow with Advanced LLM TechniquesAI Mastery 201: Elevating Your Workflow with Advanced LLM Techniques
AI Mastery 201: Elevating Your Workflow with Advanced LLM Techniques
VictorSzoltysek
 

Último (20)

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
 
The Guide to Integrating Generative AI into Unified Continuous Testing Platfo...
The Guide to Integrating Generative AI into Unified Continuous Testing Platfo...The Guide to Integrating Generative AI into Unified Continuous Testing Platfo...
The Guide to Integrating Generative AI into Unified Continuous Testing Platfo...
 
Introducing Microsoft’s new Enterprise Work Management (EWM) Solution
Introducing Microsoft’s new Enterprise Work Management (EWM) SolutionIntroducing Microsoft’s new Enterprise Work Management (EWM) Solution
Introducing Microsoft’s new Enterprise Work Management (EWM) Solution
 
VTU technical seminar 8Th Sem on Scikit-learn
VTU technical seminar 8Th Sem on Scikit-learnVTU technical seminar 8Th Sem on Scikit-learn
VTU technical seminar 8Th Sem on Scikit-learn
 
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
 
8257 interfacing 2 in microprocessor for btech students
8257 interfacing 2 in microprocessor for btech students8257 interfacing 2 in microprocessor for btech students
8257 interfacing 2 in microprocessor for btech students
 
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...
 
Learn the Fundamentals of XCUITest Framework_ A Beginner's Guide.pdf
Learn the Fundamentals of XCUITest Framework_ A Beginner's Guide.pdfLearn the Fundamentals of XCUITest Framework_ A Beginner's Guide.pdf
Learn the Fundamentals of XCUITest Framework_ A Beginner's Guide.pdf
 
TECUNIQUE: Success Stories: IT Service provider
TECUNIQUE: Success Stories: IT Service providerTECUNIQUE: Success Stories: IT Service provider
TECUNIQUE: Success Stories: IT Service provider
 
Software Quality Assurance Interview Questions
Software Quality Assurance Interview QuestionsSoftware Quality Assurance Interview Questions
Software Quality Assurance Interview Questions
 
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 🔝✔️✔️
 
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
 
Define the academic and professional writing..pdf
Define the academic and professional writing..pdfDefine the academic and professional writing..pdf
Define the academic and professional writing..pdf
 
How to Choose the Right Laravel Development Partner in New York City_compress...
How to Choose the Right Laravel Development Partner in New York City_compress...How to Choose the Right Laravel Development Partner in New York City_compress...
How to Choose the Right Laravel Development Partner in New York City_compress...
 
Unlocking the Future of AI Agents with Large Language Models
Unlocking the Future of AI Agents with Large Language ModelsUnlocking the Future of AI Agents with Large Language Models
Unlocking the Future of AI Agents with Large Language Models
 
+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...
 
Azure_Native_Qumulo_High_Performance_Compute_Benchmarks.pdf
Azure_Native_Qumulo_High_Performance_Compute_Benchmarks.pdfAzure_Native_Qumulo_High_Performance_Compute_Benchmarks.pdf
Azure_Native_Qumulo_High_Performance_Compute_Benchmarks.pdf
 
AI Mastery 201: Elevating Your Workflow with Advanced LLM Techniques
AI Mastery 201: Elevating Your Workflow with Advanced LLM TechniquesAI Mastery 201: Elevating Your Workflow with Advanced LLM Techniques
AI Mastery 201: Elevating Your Workflow with Advanced LLM Techniques
 
Shapes for Sharing between Graph Data Spaces - and Epistemic Querying of RDF-...
Shapes for Sharing between Graph Data Spaces - and Epistemic Querying of RDF-...Shapes for Sharing between Graph Data Spaces - and Epistemic Querying of RDF-...
Shapes for Sharing between Graph Data Spaces - and Epistemic Querying of RDF-...
 
Exploring the Best Video Editing App.pdf
Exploring the Best Video Editing App.pdfExploring the Best Video Editing App.pdf
Exploring the Best Video Editing App.pdf
 

Git for joomla! development #JAB14