SlideShare a Scribd company logo
Git Source Control:
For the Rest of Us
Nolan Erck
CF.Objective 2014
About Me
● Consultant (southofshasta.com)
● Software Development, Training, Design
● Using ColdFusion since 1999 (4.x)
● Other stuff: C++, Java, jQuery, PHP, .NET, etc.
● Manager of SacInteractive (formerly Sacramento CFUG)
● Reformed Video Game Developer.
● Stuff I've Done: CycleGear.com, CastImages.com,
Fusion Events Staffing, Grim Fandango, Star Wars
Rogue Squadron, SimPark, SimSafari.
Today's Agenda
● What is “source control”?
● When/why do I need it?
● How to use Git from a GUI.
● The difference in Git and GitHub.
● Next steps:
● branching, merging, reverting.
● Demos of how to do this.
● Other info.
● Questions.
Quick show of hands
(It's okay to raise your hand, I promise.)
● Who is brand new to source control?
● Who is NOT currently using any source control
in your projects?
● Who uses .OLD or .BAK files as a way to “save
your place” before making a change?
● Who makes ZIP files to backup the last version
of your code?
Scenario 1
● You're about to make a change to your website.
● “I should save a copy of this somewhere before
I break anything.”
● Windows Explorer
● AboutUs.html ---> AboutUs.BAK
● That's good, right?
Scenario 1 (cont)
● What about when you make a second change
to AboutUs.html?
● Rename the file again
● AboutUs.HTML ---> AboutUs.OLD
● Fast-forward 6 months
● Which is the “most recent backup”, BAK or OLD?
● Can't remember, have to “diff” by hand. Boo.
But wait, it gets worse
● Do you use FTP to update the site?
● And move /wwwroot up all at once?
● AboutUs.BAK and .OLD are in now in Production.
● Http://sitename/AboutUs.OLD Is a valid URL.
● Won't be processed by ColdFusion (or Ruby, PHP, etc)
● Original source code gets sent to the browser as plain
text!
● Security issue!
Don't believe me? Here's proof.
Scenario 2
● Rob and I are splitting a project.
● I'm working in contact.html
● Rob emails me a copy of contact.html with
changes of his own.
● Which lines changed? Did he change them
before/after my edits?
● I have to manually “diff” the 2 files. Boo.
Ever had this phone call?
Client: “You MUST have made a change to
the site today! Everything was working FINE
yesterday and now there is a bug.
What did YOU break?!”
Or this one?
Client: “Remember that huge change you
made to the site last week? Well I need you to
undo it. Today. Right now. Can't you just
CLICK something and make that happen?”
If only there was a way to prevent all of these
situations from happening!
There is.
Source Control.
It doesn't have to be Git. For today's talk we'll
focus on Git with a GUI client.
(Others: Subversion, CVS, Team Foundation
Server, Visual SourceSafe, PerfForce,
Mercurial.)
Source control...
● Acts as a “librarian” and “hall monitor” for your site assets
(code, images, config files, etc).
● Is software that tracks all the changes made to files on a project
(by me, Rob, you, that guy, everyone).
● Let's us share files safely.
● No more emailing files!
● Let's us change files safely too.
● No more BAK and OLD! No more ZIPs!
● Is platform agnostic.
● Works for Windows, Mac, Linux development.
● For any kind of code you write: CF, C++, Java, iPhone,
Ruby, COBOL, PHP, QBASIC, InstallShield, whatever.
Two pieces to the software
● Client
● Server
Two pieces to the software
● Client
● Desktop app, lives on your Dev box.
● OSX: Tower, GitBox, SourceTree, SmartGit, etc.
● Windows: TortoiseGit, SmartGit, etc.
● Can use any one you want.
● Can mix/match among team members.
● Free to $50-ish.
● Can change at any time, don't have to be “married”
to 1 particular client.
Two pieces to the software
● Server
● So all team members can share files.
● A central place to do the “librarian” work.
– Keep track of who changes what, when, etc.
● GitHub, Unfuddle, BeanStalk, host your own, etc.
● Can use any one you want (doesn't HAVE to be
GitHub, that's just 1 of the vendors available).
– Git != GitHub
● Git = the protocol under the hood (e.g. CVS, Subversion)
● GitHub = a popular choice for your Git server
Server + Clients
Git Server
John
GitHub, BitBucket,
Unfuddle, etc
Paul George WWW
TortoiseGit GitBox GitBox SmartGit
(Poor Ringo...always left out.)
Adding a file to a Git Repo
● AKA the “git add” command.
● “I want Git to watch this file for changes”.
● Do it once, after you create the file.
● Just because you MAKE a file, that DOESN'T mean
Git watches it for changes.
● You MUST “add” the file to the Git repo.
● Let's look at an example....
Committing a file
● “git commit”
● Git: take a snapshot of what this file looks like
right now, for later reference.
● Do this instead of making .BAK files.
● The “committed” version of the file is stored
locally.
● Let's look at an example...
Pushing a file
● “git push”
● Git: “take the snapshot you made and copy it up
to the Git server.”
● Do this whenever the file(s) is ready to be
shared with your team, or ready for inclusion in
the latest build, etc.
● Let's look at an example...
Reverting a file
● AKA the “git revert” command.
● “Ack! I just made a huge mistake in this file.
How do I get it back to what it used to look
like?”
● Do this any time you messed up and need to
undo a change.
● Under the hood, Git protocol is the same
regardless of GUI client. The actual “thing” you
press will vary between GUI clients.
● Here's an example in TortoiseGit...
Branching
● “git branch”
● “I'm about to make a change to the site. I want
a safe way to add my changes, but undo them
quickly if something goes wrong.”
● Do this: Always.
● If you're making a change to the site, put it in its
own branch.
– Yes, even for that tiny change that's only in 1 file.
● Example time again...
Merging Branches
● “git merge”
● “My new feature has been blessed by QA as
bug free and is ready to be put on the Live
server”.
● (Or combined with other features for the next build.)
● Let's look at an example...
Common Practices
● Make a branch called “Master” for what the Production server
should look like.
● Don't actually write code in this branch.
– Write in other branches, then merge them into Master.
● Anytime I “pull from Master”, I get an exact copy of what's on
the Live server.
● Make a branch called “QA”. As bugs are fixed, merge them into
QA.
● When everything in QA looks correct, merge it into “master”.
● Don't be afraid to make “temporary branches” to try out new
ideas. There is no harm in making/deleting new branches.
Other Resources
● Pro Git Book
● FREE!
● http://git-scm.com/book
● Good info, examples are command-line.
● Tim Cunningham's Git presos and blog entries
(cfmumbojumbo.com)
● CF Hour Podcast, episode 118
● Lots of (short) tutorial videos on YouTube
● Google
Questions? Comments?
Ways to reach me...
Email: nolan.erck@gmail.com
Twitter: @southofshasta
Blog: southofshasta.com
Thanks!

More Related Content

What's hot

Git For The Android Developer
Git For The Android DeveloperGit For The Android Developer
Git For The Android Developer
Effective
 
Juc boston2014.pptx
Juc boston2014.pptxJuc boston2014.pptx
Juc boston2014.pptx
Brandon Mueller
 
Up GitLab Presentation 2015
Up GitLab Presentation 2015Up GitLab Presentation 2015
Up GitLab Presentation 2015
Kumaran Balachandran
 
Git for Android Developers
Git for Android DevelopersGit for Android Developers
Git for Android Developers
Tony Hillerson
 
Sculpin
SculpinSculpin
Go with the Flow - A Guide to a WordPress Workflow
Go with the Flow - A Guide to a WordPress WorkflowGo with the Flow - A Guide to a WordPress Workflow
Go with the Flow - A Guide to a WordPress Workflow
Ann Cascarano
 
PUG Romagna - Pipeline + Deployer PHP
PUG Romagna - Pipeline + Deployer PHPPUG Romagna - Pipeline + Deployer PHP
PUG Romagna - Pipeline + Deployer PHP
Giuseppe Morelli
 
High Productivity Web Development Workflow
High Productivity Web Development WorkflowHigh Productivity Web Development Workflow
High Productivity Web Development Workflow
Vũ Nguyễn
 
Git workflow in agile development
Git workflow in agile developmentGit workflow in agile development
Git workflow in agile development
Zack Siri
 
COSCUP 2016: Project 52 每週一個小專案來學習 Golang
COSCUP 2016: Project 52 每週一個小專案來學習 GolangCOSCUP 2016: Project 52 每週一個小專案來學習 Golang
COSCUP 2016: Project 52 每週一個小專案來學習 Golang
Evan Lin
 
Go with the Flow - A Guide to a WordPress Workflow
Go with the Flow - A Guide to a WordPress WorkflowGo with the Flow - A Guide to a WordPress Workflow
Go with the Flow - A Guide to a WordPress Workflow
Ann Cascarano
 
Git & Github
Git & GithubGit & Github
Git & Github
Aman Lalpuria
 
Git and git workflow best practice
Git and git workflow best practiceGit and git workflow best practice
Git and git workflow best practice
Majid Hosseini
 
Ignite Devops Fast Moving Software
Ignite Devops Fast Moving SoftwareIgnite Devops Fast Moving Software
Ignite Devops Fast Moving Software
SpamapS
 
7 recomendaciones para migrar tus aplicaciones a Jakarta EE utilizando Apache...
7 recomendaciones para migrar tus aplicaciones a Jakarta EE utilizando Apache...7 recomendaciones para migrar tus aplicaciones a Jakarta EE utilizando Apache...
7 recomendaciones para migrar tus aplicaciones a Jakarta EE utilizando Apache...
César Hernández
 
Blogging for hackers (english)
Blogging for hackers (english)Blogging for hackers (english)
Blogging for hackers (english)
Stephen Mariano Cabrera
 
Successful Joomla migrations that don't hurt Search Engine Rankings
Successful Joomla migrations that don't hurt Search Engine RankingsSuccessful Joomla migrations that don't hurt Search Engine Rankings
Successful Joomla migrations that don't hurt Search Engine Rankings
Joomla Day South Africa
 
Why Your Site is Slow: Performance Answers for Your Clients
Why Your Site is Slow: Performance Answers for Your ClientsWhy Your Site is Slow: Performance Answers for Your Clients
Why Your Site is Slow: Performance Answers for Your Clients
Pantheon
 
Open Source Collaboration With Git And Git Hub
Open Source Collaboration With Git And Git HubOpen Source Collaboration With Git And Git Hub
Open Source Collaboration With Git And Git HubNick Quaranto
 
TYPO3 Camp Stuttgart 2015 - Continuous Delivery with Open Source Tools
TYPO3 Camp Stuttgart 2015 - Continuous Delivery with Open Source ToolsTYPO3 Camp Stuttgart 2015 - Continuous Delivery with Open Source Tools
TYPO3 Camp Stuttgart 2015 - Continuous Delivery with Open Source Tools
Michael Lihs
 

What's hot (20)

Git For The Android Developer
Git For The Android DeveloperGit For The Android Developer
Git For The Android Developer
 
Juc boston2014.pptx
Juc boston2014.pptxJuc boston2014.pptx
Juc boston2014.pptx
 
Up GitLab Presentation 2015
Up GitLab Presentation 2015Up GitLab Presentation 2015
Up GitLab Presentation 2015
 
Git for Android Developers
Git for Android DevelopersGit for Android Developers
Git for Android Developers
 
Sculpin
SculpinSculpin
Sculpin
 
Go with the Flow - A Guide to a WordPress Workflow
Go with the Flow - A Guide to a WordPress WorkflowGo with the Flow - A Guide to a WordPress Workflow
Go with the Flow - A Guide to a WordPress Workflow
 
PUG Romagna - Pipeline + Deployer PHP
PUG Romagna - Pipeline + Deployer PHPPUG Romagna - Pipeline + Deployer PHP
PUG Romagna - Pipeline + Deployer PHP
 
High Productivity Web Development Workflow
High Productivity Web Development WorkflowHigh Productivity Web Development Workflow
High Productivity Web Development Workflow
 
Git workflow in agile development
Git workflow in agile developmentGit workflow in agile development
Git workflow in agile development
 
COSCUP 2016: Project 52 每週一個小專案來學習 Golang
COSCUP 2016: Project 52 每週一個小專案來學習 GolangCOSCUP 2016: Project 52 每週一個小專案來學習 Golang
COSCUP 2016: Project 52 每週一個小專案來學習 Golang
 
Go with the Flow - A Guide to a WordPress Workflow
Go with the Flow - A Guide to a WordPress WorkflowGo with the Flow - A Guide to a WordPress Workflow
Go with the Flow - A Guide to a WordPress Workflow
 
Git & Github
Git & GithubGit & Github
Git & Github
 
Git and git workflow best practice
Git and git workflow best practiceGit and git workflow best practice
Git and git workflow best practice
 
Ignite Devops Fast Moving Software
Ignite Devops Fast Moving SoftwareIgnite Devops Fast Moving Software
Ignite Devops Fast Moving Software
 
7 recomendaciones para migrar tus aplicaciones a Jakarta EE utilizando Apache...
7 recomendaciones para migrar tus aplicaciones a Jakarta EE utilizando Apache...7 recomendaciones para migrar tus aplicaciones a Jakarta EE utilizando Apache...
7 recomendaciones para migrar tus aplicaciones a Jakarta EE utilizando Apache...
 
Blogging for hackers (english)
Blogging for hackers (english)Blogging for hackers (english)
Blogging for hackers (english)
 
Successful Joomla migrations that don't hurt Search Engine Rankings
Successful Joomla migrations that don't hurt Search Engine RankingsSuccessful Joomla migrations that don't hurt Search Engine Rankings
Successful Joomla migrations that don't hurt Search Engine Rankings
 
Why Your Site is Slow: Performance Answers for Your Clients
Why Your Site is Slow: Performance Answers for Your ClientsWhy Your Site is Slow: Performance Answers for Your Clients
Why Your Site is Slow: Performance Answers for Your Clients
 
Open Source Collaboration With Git And Git Hub
Open Source Collaboration With Git And Git HubOpen Source Collaboration With Git And Git Hub
Open Source Collaboration With Git And Git Hub
 
TYPO3 Camp Stuttgart 2015 - Continuous Delivery with Open Source Tools
TYPO3 Camp Stuttgart 2015 - Continuous Delivery with Open Source ToolsTYPO3 Camp Stuttgart 2015 - Continuous Delivery with Open Source Tools
TYPO3 Camp Stuttgart 2015 - Continuous Delivery with Open Source Tools
 

Similar to Git sourcecontrolpreso

DevOps Workshop Part 1
DevOps Workshop Part 1DevOps Workshop Part 1
DevOps Workshop Part 1
GDSC UofT Mississauga
 
Introduction to git & WordPress
Introduction to git & WordPressIntroduction to git & WordPress
Introduction to git & WordPress
Josh Lee
 
Collaborative development with git
Collaborative development with gitCollaborative development with git
Collaborative development with git
Joseluis Laso
 
Brief tutorial on Git
Brief tutorial on GitBrief tutorial on Git
Brief tutorial on Git
聖文 鄭
 
Improve the deployment process step by step
Improve the deployment process step by stepImprove the deployment process step by step
Improve the deployment process step by step
Daniel Fahlke
 
Using Git with WordPress - Presented by Nigel Rodgers.
Using Git with WordPress - Presented by Nigel Rodgers.Using Git with WordPress - Presented by Nigel Rodgers.
Using Git with WordPress - Presented by Nigel Rodgers.
WordCamp Harare
 
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!
Cory Webb
 
Microservices Development Process at Predix.io
Microservices Development Process at Predix.ioMicroservices Development Process at Predix.io
Microservices Development Process at Predix.io
Constantine Grigel
 
BLUG 2012 Version Control for Notes Developers
BLUG 2012 Version Control for Notes DevelopersBLUG 2012 Version Control for Notes Developers
BLUG 2012 Version Control for Notes Developers
Martin Jinoch
 
Gitlab Commit: How Containerized GitLab CI Pipelines Can Help You Streamline ...
Gitlab Commit: How Containerized GitLab CI Pipelines Can Help You Streamline ...Gitlab Commit: How Containerized GitLab CI Pipelines Can Help You Streamline ...
Gitlab Commit: How Containerized GitLab CI Pipelines Can Help You Streamline ...
Nico Meisenzahl
 
Buildout: creating and deploying repeatable applications in python
Buildout: creating and deploying repeatable applications in pythonBuildout: creating and deploying repeatable applications in python
Buildout: creating and deploying repeatable applications in python
CodeSyntax
 
Lesson 0.5 Introduction to Git (1).pptx
Lesson 0.5 Introduction to Git (1).pptxLesson 0.5 Introduction to Git (1).pptx
Lesson 0.5 Introduction to Git (1).pptx
AliSaeed579036
 
How to plan and define your CI-CD pipeline
How to plan and define your CI-CD pipelineHow to plan and define your CI-CD pipeline
How to plan and define your CI-CD pipeline
ElasTest Project
 
My "Perfect" Toolchain Setup for Grails Projects
My "Perfect" Toolchain Setup for Grails ProjectsMy "Perfect" Toolchain Setup for Grails Projects
My "Perfect" Toolchain Setup for Grails Projects
GR8Conf
 
Git 101: Force-sensitive to Jedi padawan
Git 101: Force-sensitive to Jedi padawanGit 101: Force-sensitive to Jedi padawan
Git 101: Force-sensitive to Jedi padawan
James Ford
 
Git Basics
Git BasicsGit Basics
Git Basics
Ryan Condron
 
Spark and S3 with Ryan Blue
Spark and S3 with Ryan BlueSpark and S3 with Ryan Blue
Spark and S3 with Ryan Blue
Databricks
 
Detecting secrets in code committed to gitlab (in real time)
Detecting secrets in code committed to gitlab (in real time)Detecting secrets in code committed to gitlab (in real time)
Detecting secrets in code committed to gitlab (in real time)
Chandrapal Badshah
 
Git Series. Episode 3. Git Flow and Github-Flow
Git Series. Episode 3. Git Flow and Github-FlowGit Series. Episode 3. Git Flow and Github-Flow
Git Series. Episode 3. Git Flow and Github-Flow
Mikhail Melnik
 
Survival of the Continuist
Survival of the ContinuistSurvival of the Continuist
Survival of the Continuist
Paul Blundell
 

Similar to Git sourcecontrolpreso (20)

DevOps Workshop Part 1
DevOps Workshop Part 1DevOps Workshop Part 1
DevOps Workshop Part 1
 
Introduction to git & WordPress
Introduction to git & WordPressIntroduction to git & WordPress
Introduction to git & WordPress
 
Collaborative development with git
Collaborative development with gitCollaborative development with git
Collaborative development with git
 
Brief tutorial on Git
Brief tutorial on GitBrief tutorial on Git
Brief tutorial on Git
 
Improve the deployment process step by step
Improve the deployment process step by stepImprove the deployment process step by step
Improve the deployment process step by step
 
Using Git with WordPress - Presented by Nigel Rodgers.
Using Git with WordPress - Presented by Nigel Rodgers.Using Git with WordPress - Presented by Nigel Rodgers.
Using Git with WordPress - Presented by Nigel Rodgers.
 
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!
 
Microservices Development Process at Predix.io
Microservices Development Process at Predix.ioMicroservices Development Process at Predix.io
Microservices Development Process at Predix.io
 
BLUG 2012 Version Control for Notes Developers
BLUG 2012 Version Control for Notes DevelopersBLUG 2012 Version Control for Notes Developers
BLUG 2012 Version Control for Notes Developers
 
Gitlab Commit: How Containerized GitLab CI Pipelines Can Help You Streamline ...
Gitlab Commit: How Containerized GitLab CI Pipelines Can Help You Streamline ...Gitlab Commit: How Containerized GitLab CI Pipelines Can Help You Streamline ...
Gitlab Commit: How Containerized GitLab CI Pipelines Can Help You Streamline ...
 
Buildout: creating and deploying repeatable applications in python
Buildout: creating and deploying repeatable applications in pythonBuildout: creating and deploying repeatable applications in python
Buildout: creating and deploying repeatable applications in python
 
Lesson 0.5 Introduction to Git (1).pptx
Lesson 0.5 Introduction to Git (1).pptxLesson 0.5 Introduction to Git (1).pptx
Lesson 0.5 Introduction to Git (1).pptx
 
How to plan and define your CI-CD pipeline
How to plan and define your CI-CD pipelineHow to plan and define your CI-CD pipeline
How to plan and define your CI-CD pipeline
 
My "Perfect" Toolchain Setup for Grails Projects
My "Perfect" Toolchain Setup for Grails ProjectsMy "Perfect" Toolchain Setup for Grails Projects
My "Perfect" Toolchain Setup for Grails Projects
 
Git 101: Force-sensitive to Jedi padawan
Git 101: Force-sensitive to Jedi padawanGit 101: Force-sensitive to Jedi padawan
Git 101: Force-sensitive to Jedi padawan
 
Git Basics
Git BasicsGit Basics
Git Basics
 
Spark and S3 with Ryan Blue
Spark and S3 with Ryan BlueSpark and S3 with Ryan Blue
Spark and S3 with Ryan Blue
 
Detecting secrets in code committed to gitlab (in real time)
Detecting secrets in code committed to gitlab (in real time)Detecting secrets in code committed to gitlab (in real time)
Detecting secrets in code committed to gitlab (in real time)
 
Git Series. Episode 3. Git Flow and Github-Flow
Git Series. Episode 3. Git Flow and Github-FlowGit Series. Episode 3. Git Flow and Github-Flow
Git Series. Episode 3. Git Flow and Github-Flow
 
Survival of the Continuist
Survival of the ContinuistSurvival of the Continuist
Survival of the Continuist
 

More from ColdFusionConference

Api manager preconference
Api manager preconferenceApi manager preconference
Api manager preconference
ColdFusionConference
 
Cf ppt vsr
Cf ppt vsrCf ppt vsr
Building better SQL Server Databases
Building better SQL Server DatabasesBuilding better SQL Server Databases
Building better SQL Server Databases
ColdFusionConference
 
API Economy, Realizing the Business Value of APIs
API Economy, Realizing the Business Value of APIsAPI Economy, Realizing the Business Value of APIs
API Economy, Realizing the Business Value of APIs
ColdFusionConference
 
Don't just pdf, Smart PDF
Don't just pdf, Smart PDFDon't just pdf, Smart PDF
Don't just pdf, Smart PDF
ColdFusionConference
 
Crafting ColdFusion Applications like an Architect
Crafting ColdFusion Applications like an ArchitectCrafting ColdFusion Applications like an Architect
Crafting ColdFusion Applications like an Architect
ColdFusionConference
 
Security And Access Control For APIS using CF API Manager
Security And Access Control For APIS using CF API ManagerSecurity And Access Control For APIS using CF API Manager
Security And Access Control For APIS using CF API Manager
ColdFusionConference
 
Monetizing Business Models: ColdFusion and APIS
Monetizing Business Models: ColdFusion and APISMonetizing Business Models: ColdFusion and APIS
Monetizing Business Models: ColdFusion and APIS
ColdFusionConference
 
Become a Security Rockstar with ColdFusion 2016
Become a Security Rockstar with ColdFusion 2016Become a Security Rockstar with ColdFusion 2016
Become a Security Rockstar with ColdFusion 2016
ColdFusionConference
 
ColdFusion in Transit action
ColdFusion in Transit actionColdFusion in Transit action
ColdFusion in Transit action
ColdFusionConference
 
Developer Insights for Application Upgrade to ColdFusion 2016
Developer Insights for Application Upgrade to ColdFusion 2016Developer Insights for Application Upgrade to ColdFusion 2016
Developer Insights for Application Upgrade to ColdFusion 2016
ColdFusionConference
 
Where is cold fusion headed
Where is cold fusion headedWhere is cold fusion headed
Where is cold fusion headed
ColdFusionConference
 
ColdFusion Keynote: Building the Agile Web Since 1995
ColdFusion Keynote: Building the Agile Web Since 1995ColdFusion Keynote: Building the Agile Web Since 1995
ColdFusion Keynote: Building the Agile Web Since 1995
ColdFusionConference
 
Instant ColdFusion with Vagrant
Instant ColdFusion with VagrantInstant ColdFusion with Vagrant
Instant ColdFusion with Vagrant
ColdFusionConference
 
Restful services with ColdFusion
Restful services with ColdFusionRestful services with ColdFusion
Restful services with ColdFusion
ColdFusionConference
 
Super Fast Application development with Mura CMS
Super Fast Application development with Mura CMSSuper Fast Application development with Mura CMS
Super Fast Application development with Mura CMS
ColdFusionConference
 
Build your own secure and real-time dashboard for mobile and web
Build your own secure and real-time dashboard for mobile and webBuild your own secure and real-time dashboard for mobile and web
Build your own secure and real-time dashboard for mobile and web
ColdFusionConference
 
Why Everyone else writes bad code
Why Everyone else writes bad codeWhy Everyone else writes bad code
Why Everyone else writes bad code
ColdFusionConference
 
Securing applications
Securing applicationsSecuring applications
Securing applications
ColdFusionConference
 
Testing automaton
Testing automatonTesting automaton
Testing automaton
ColdFusionConference
 

More from ColdFusionConference (20)

Api manager preconference
Api manager preconferenceApi manager preconference
Api manager preconference
 
Cf ppt vsr
Cf ppt vsrCf ppt vsr
Cf ppt vsr
 
Building better SQL Server Databases
Building better SQL Server DatabasesBuilding better SQL Server Databases
Building better SQL Server Databases
 
API Economy, Realizing the Business Value of APIs
API Economy, Realizing the Business Value of APIsAPI Economy, Realizing the Business Value of APIs
API Economy, Realizing the Business Value of APIs
 
Don't just pdf, Smart PDF
Don't just pdf, Smart PDFDon't just pdf, Smart PDF
Don't just pdf, Smart PDF
 
Crafting ColdFusion Applications like an Architect
Crafting ColdFusion Applications like an ArchitectCrafting ColdFusion Applications like an Architect
Crafting ColdFusion Applications like an Architect
 
Security And Access Control For APIS using CF API Manager
Security And Access Control For APIS using CF API ManagerSecurity And Access Control For APIS using CF API Manager
Security And Access Control For APIS using CF API Manager
 
Monetizing Business Models: ColdFusion and APIS
Monetizing Business Models: ColdFusion and APISMonetizing Business Models: ColdFusion and APIS
Monetizing Business Models: ColdFusion and APIS
 
Become a Security Rockstar with ColdFusion 2016
Become a Security Rockstar with ColdFusion 2016Become a Security Rockstar with ColdFusion 2016
Become a Security Rockstar with ColdFusion 2016
 
ColdFusion in Transit action
ColdFusion in Transit actionColdFusion in Transit action
ColdFusion in Transit action
 
Developer Insights for Application Upgrade to ColdFusion 2016
Developer Insights for Application Upgrade to ColdFusion 2016Developer Insights for Application Upgrade to ColdFusion 2016
Developer Insights for Application Upgrade to ColdFusion 2016
 
Where is cold fusion headed
Where is cold fusion headedWhere is cold fusion headed
Where is cold fusion headed
 
ColdFusion Keynote: Building the Agile Web Since 1995
ColdFusion Keynote: Building the Agile Web Since 1995ColdFusion Keynote: Building the Agile Web Since 1995
ColdFusion Keynote: Building the Agile Web Since 1995
 
Instant ColdFusion with Vagrant
Instant ColdFusion with VagrantInstant ColdFusion with Vagrant
Instant ColdFusion with Vagrant
 
Restful services with ColdFusion
Restful services with ColdFusionRestful services with ColdFusion
Restful services with ColdFusion
 
Super Fast Application development with Mura CMS
Super Fast Application development with Mura CMSSuper Fast Application development with Mura CMS
Super Fast Application development with Mura CMS
 
Build your own secure and real-time dashboard for mobile and web
Build your own secure and real-time dashboard for mobile and webBuild your own secure and real-time dashboard for mobile and web
Build your own secure and real-time dashboard for mobile and web
 
Why Everyone else writes bad code
Why Everyone else writes bad codeWhy Everyone else writes bad code
Why Everyone else writes bad code
 
Securing applications
Securing applicationsSecuring applications
Securing applications
 
Testing automaton
Testing automatonTesting automaton
Testing automaton
 

Recently uploaded

Mobile App Development Company In Noida | Drona Infotech
Mobile App Development Company In Noida | Drona InfotechMobile App Development Company In Noida | Drona Infotech
Mobile App Development Company In Noida | Drona Infotech
Drona Infotech
 
Game Development with Unity3D (Game Development lecture 3)
Game Development  with Unity3D (Game Development lecture 3)Game Development  with Unity3D (Game Development lecture 3)
Game Development with Unity3D (Game Development lecture 3)
abdulrafaychaudhry
 
Orion Context Broker introduction 20240604
Orion Context Broker introduction 20240604Orion Context Broker introduction 20240604
Orion Context Broker introduction 20240604
Fermin Galan
 
E-commerce Application Development Company.pdf
E-commerce Application Development Company.pdfE-commerce Application Development Company.pdf
E-commerce Application Development Company.pdf
Hornet Dynamics
 
Top Features to Include in Your Winzo Clone App for Business Growth (4).pptx
Top Features to Include in Your Winzo Clone App for Business Growth (4).pptxTop Features to Include in Your Winzo Clone App for Business Growth (4).pptx
Top Features to Include in Your Winzo Clone App for Business Growth (4).pptx
rickgrimesss22
 
Vitthal Shirke Java Microservices Resume.pdf
Vitthal Shirke Java Microservices Resume.pdfVitthal Shirke Java Microservices Resume.pdf
Vitthal Shirke Java Microservices Resume.pdf
Vitthal Shirke
 
A Study of Variable-Role-based Feature Enrichment in Neural Models of Code
A Study of Variable-Role-based Feature Enrichment in Neural Models of CodeA Study of Variable-Role-based Feature Enrichment in Neural Models of Code
A Study of Variable-Role-based Feature Enrichment in Neural Models of Code
Aftab Hussain
 
A Sighting of filterA in Typelevel Rite of Passage
A Sighting of filterA in Typelevel Rite of PassageA Sighting of filterA in Typelevel Rite of Passage
A Sighting of filterA in Typelevel Rite of Passage
Philip Schwarz
 
AI Fusion Buddy Review: Brand New, Groundbreaking Gemini-Powered AI App
AI Fusion Buddy Review: Brand New, Groundbreaking Gemini-Powered AI AppAI Fusion Buddy Review: Brand New, Groundbreaking Gemini-Powered AI App
AI Fusion Buddy Review: Brand New, Groundbreaking Gemini-Powered AI App
Google
 
2024 eCommerceDays Toulouse - Sylius 2.0.pdf
2024 eCommerceDays Toulouse - Sylius 2.0.pdf2024 eCommerceDays Toulouse - Sylius 2.0.pdf
2024 eCommerceDays Toulouse - Sylius 2.0.pdf
Łukasz Chruściel
 
Automated software refactoring with OpenRewrite and Generative AI.pptx.pdf
Automated software refactoring with OpenRewrite and Generative AI.pptx.pdfAutomated software refactoring with OpenRewrite and Generative AI.pptx.pdf
Automated software refactoring with OpenRewrite and Generative AI.pptx.pdf
timtebeek1
 
OpenMetadata Community Meeting - 5th June 2024
OpenMetadata Community Meeting - 5th June 2024OpenMetadata Community Meeting - 5th June 2024
OpenMetadata Community Meeting - 5th June 2024
OpenMetadata
 
Nidhi Software Price. Fact , Costs, Tips
Nidhi Software Price. Fact , Costs, TipsNidhi Software Price. Fact , Costs, Tips
Nidhi Software Price. Fact , Costs, Tips
vrstrong314
 
Enhancing Research Orchestration Capabilities at ORNL.pdf
Enhancing Research Orchestration Capabilities at ORNL.pdfEnhancing Research Orchestration Capabilities at ORNL.pdf
Enhancing Research Orchestration Capabilities at ORNL.pdf
Globus
 
Utilocate provides Smarter, Better, Faster, Safer Locate Ticket Management
Utilocate provides Smarter, Better, Faster, Safer Locate Ticket ManagementUtilocate provides Smarter, Better, Faster, Safer Locate Ticket Management
Utilocate provides Smarter, Better, Faster, Safer Locate Ticket Management
Utilocate
 
Need for Speed: Removing speed bumps from your Symfony projects ⚡️
Need for Speed: Removing speed bumps from your Symfony projects ⚡️Need for Speed: Removing speed bumps from your Symfony projects ⚡️
Need for Speed: Removing speed bumps from your Symfony projects ⚡️
Łukasz Chruściel
 
GOING AOT WITH GRAALVM FOR SPRING BOOT (SPRING IO)
GOING AOT WITH GRAALVM FOR  SPRING BOOT (SPRING IO)GOING AOT WITH GRAALVM FOR  SPRING BOOT (SPRING IO)
GOING AOT WITH GRAALVM FOR SPRING BOOT (SPRING IO)
Alina Yurenko
 
Lecture 1 Introduction to games development
Lecture 1 Introduction to games developmentLecture 1 Introduction to games development
Lecture 1 Introduction to games development
abdulrafaychaudhry
 
GraphSummit Paris - The art of the possible with Graph Technology
GraphSummit Paris - The art of the possible with Graph TechnologyGraphSummit Paris - The art of the possible with Graph Technology
GraphSummit Paris - The art of the possible with Graph Technology
Neo4j
 
Providing Globus Services to Users of JASMIN for Environmental Data Analysis
Providing Globus Services to Users of JASMIN for Environmental Data AnalysisProviding Globus Services to Users of JASMIN for Environmental Data Analysis
Providing Globus Services to Users of JASMIN for Environmental Data Analysis
Globus
 

Recently uploaded (20)

Mobile App Development Company In Noida | Drona Infotech
Mobile App Development Company In Noida | Drona InfotechMobile App Development Company In Noida | Drona Infotech
Mobile App Development Company In Noida | Drona Infotech
 
Game Development with Unity3D (Game Development lecture 3)
Game Development  with Unity3D (Game Development lecture 3)Game Development  with Unity3D (Game Development lecture 3)
Game Development with Unity3D (Game Development lecture 3)
 
Orion Context Broker introduction 20240604
Orion Context Broker introduction 20240604Orion Context Broker introduction 20240604
Orion Context Broker introduction 20240604
 
E-commerce Application Development Company.pdf
E-commerce Application Development Company.pdfE-commerce Application Development Company.pdf
E-commerce Application Development Company.pdf
 
Top Features to Include in Your Winzo Clone App for Business Growth (4).pptx
Top Features to Include in Your Winzo Clone App for Business Growth (4).pptxTop Features to Include in Your Winzo Clone App for Business Growth (4).pptx
Top Features to Include in Your Winzo Clone App for Business Growth (4).pptx
 
Vitthal Shirke Java Microservices Resume.pdf
Vitthal Shirke Java Microservices Resume.pdfVitthal Shirke Java Microservices Resume.pdf
Vitthal Shirke Java Microservices Resume.pdf
 
A Study of Variable-Role-based Feature Enrichment in Neural Models of Code
A Study of Variable-Role-based Feature Enrichment in Neural Models of CodeA Study of Variable-Role-based Feature Enrichment in Neural Models of Code
A Study of Variable-Role-based Feature Enrichment in Neural Models of Code
 
A Sighting of filterA in Typelevel Rite of Passage
A Sighting of filterA in Typelevel Rite of PassageA Sighting of filterA in Typelevel Rite of Passage
A Sighting of filterA in Typelevel Rite of Passage
 
AI Fusion Buddy Review: Brand New, Groundbreaking Gemini-Powered AI App
AI Fusion Buddy Review: Brand New, Groundbreaking Gemini-Powered AI AppAI Fusion Buddy Review: Brand New, Groundbreaking Gemini-Powered AI App
AI Fusion Buddy Review: Brand New, Groundbreaking Gemini-Powered AI App
 
2024 eCommerceDays Toulouse - Sylius 2.0.pdf
2024 eCommerceDays Toulouse - Sylius 2.0.pdf2024 eCommerceDays Toulouse - Sylius 2.0.pdf
2024 eCommerceDays Toulouse - Sylius 2.0.pdf
 
Automated software refactoring with OpenRewrite and Generative AI.pptx.pdf
Automated software refactoring with OpenRewrite and Generative AI.pptx.pdfAutomated software refactoring with OpenRewrite and Generative AI.pptx.pdf
Automated software refactoring with OpenRewrite and Generative AI.pptx.pdf
 
OpenMetadata Community Meeting - 5th June 2024
OpenMetadata Community Meeting - 5th June 2024OpenMetadata Community Meeting - 5th June 2024
OpenMetadata Community Meeting - 5th June 2024
 
Nidhi Software Price. Fact , Costs, Tips
Nidhi Software Price. Fact , Costs, TipsNidhi Software Price. Fact , Costs, Tips
Nidhi Software Price. Fact , Costs, Tips
 
Enhancing Research Orchestration Capabilities at ORNL.pdf
Enhancing Research Orchestration Capabilities at ORNL.pdfEnhancing Research Orchestration Capabilities at ORNL.pdf
Enhancing Research Orchestration Capabilities at ORNL.pdf
 
Utilocate provides Smarter, Better, Faster, Safer Locate Ticket Management
Utilocate provides Smarter, Better, Faster, Safer Locate Ticket ManagementUtilocate provides Smarter, Better, Faster, Safer Locate Ticket Management
Utilocate provides Smarter, Better, Faster, Safer Locate Ticket Management
 
Need for Speed: Removing speed bumps from your Symfony projects ⚡️
Need for Speed: Removing speed bumps from your Symfony projects ⚡️Need for Speed: Removing speed bumps from your Symfony projects ⚡️
Need for Speed: Removing speed bumps from your Symfony projects ⚡️
 
GOING AOT WITH GRAALVM FOR SPRING BOOT (SPRING IO)
GOING AOT WITH GRAALVM FOR  SPRING BOOT (SPRING IO)GOING AOT WITH GRAALVM FOR  SPRING BOOT (SPRING IO)
GOING AOT WITH GRAALVM FOR SPRING BOOT (SPRING IO)
 
Lecture 1 Introduction to games development
Lecture 1 Introduction to games developmentLecture 1 Introduction to games development
Lecture 1 Introduction to games development
 
GraphSummit Paris - The art of the possible with Graph Technology
GraphSummit Paris - The art of the possible with Graph TechnologyGraphSummit Paris - The art of the possible with Graph Technology
GraphSummit Paris - The art of the possible with Graph Technology
 
Providing Globus Services to Users of JASMIN for Environmental Data Analysis
Providing Globus Services to Users of JASMIN for Environmental Data AnalysisProviding Globus Services to Users of JASMIN for Environmental Data Analysis
Providing Globus Services to Users of JASMIN for Environmental Data Analysis
 

Git sourcecontrolpreso

  • 1. Git Source Control: For the Rest of Us Nolan Erck CF.Objective 2014
  • 2. About Me ● Consultant (southofshasta.com) ● Software Development, Training, Design ● Using ColdFusion since 1999 (4.x) ● Other stuff: C++, Java, jQuery, PHP, .NET, etc. ● Manager of SacInteractive (formerly Sacramento CFUG) ● Reformed Video Game Developer. ● Stuff I've Done: CycleGear.com, CastImages.com, Fusion Events Staffing, Grim Fandango, Star Wars Rogue Squadron, SimPark, SimSafari.
  • 3. Today's Agenda ● What is “source control”? ● When/why do I need it? ● How to use Git from a GUI. ● The difference in Git and GitHub. ● Next steps: ● branching, merging, reverting. ● Demos of how to do this. ● Other info. ● Questions.
  • 4. Quick show of hands (It's okay to raise your hand, I promise.) ● Who is brand new to source control? ● Who is NOT currently using any source control in your projects? ● Who uses .OLD or .BAK files as a way to “save your place” before making a change? ● Who makes ZIP files to backup the last version of your code?
  • 5. Scenario 1 ● You're about to make a change to your website. ● “I should save a copy of this somewhere before I break anything.” ● Windows Explorer ● AboutUs.html ---> AboutUs.BAK ● That's good, right?
  • 6. Scenario 1 (cont) ● What about when you make a second change to AboutUs.html? ● Rename the file again ● AboutUs.HTML ---> AboutUs.OLD ● Fast-forward 6 months ● Which is the “most recent backup”, BAK or OLD? ● Can't remember, have to “diff” by hand. Boo.
  • 7. But wait, it gets worse ● Do you use FTP to update the site? ● And move /wwwroot up all at once? ● AboutUs.BAK and .OLD are in now in Production. ● Http://sitename/AboutUs.OLD Is a valid URL. ● Won't be processed by ColdFusion (or Ruby, PHP, etc) ● Original source code gets sent to the browser as plain text! ● Security issue!
  • 8. Don't believe me? Here's proof.
  • 9. Scenario 2 ● Rob and I are splitting a project. ● I'm working in contact.html ● Rob emails me a copy of contact.html with changes of his own. ● Which lines changed? Did he change them before/after my edits? ● I have to manually “diff” the 2 files. Boo.
  • 10. Ever had this phone call? Client: “You MUST have made a change to the site today! Everything was working FINE yesterday and now there is a bug. What did YOU break?!”
  • 11. Or this one? Client: “Remember that huge change you made to the site last week? Well I need you to undo it. Today. Right now. Can't you just CLICK something and make that happen?”
  • 12. If only there was a way to prevent all of these situations from happening!
  • 13. There is. Source Control. It doesn't have to be Git. For today's talk we'll focus on Git with a GUI client. (Others: Subversion, CVS, Team Foundation Server, Visual SourceSafe, PerfForce, Mercurial.)
  • 14. Source control... ● Acts as a “librarian” and “hall monitor” for your site assets (code, images, config files, etc). ● Is software that tracks all the changes made to files on a project (by me, Rob, you, that guy, everyone). ● Let's us share files safely. ● No more emailing files! ● Let's us change files safely too. ● No more BAK and OLD! No more ZIPs! ● Is platform agnostic. ● Works for Windows, Mac, Linux development. ● For any kind of code you write: CF, C++, Java, iPhone, Ruby, COBOL, PHP, QBASIC, InstallShield, whatever.
  • 15. Two pieces to the software ● Client ● Server
  • 16. Two pieces to the software ● Client ● Desktop app, lives on your Dev box. ● OSX: Tower, GitBox, SourceTree, SmartGit, etc. ● Windows: TortoiseGit, SmartGit, etc. ● Can use any one you want. ● Can mix/match among team members. ● Free to $50-ish. ● Can change at any time, don't have to be “married” to 1 particular client.
  • 17. Two pieces to the software ● Server ● So all team members can share files. ● A central place to do the “librarian” work. – Keep track of who changes what, when, etc. ● GitHub, Unfuddle, BeanStalk, host your own, etc. ● Can use any one you want (doesn't HAVE to be GitHub, that's just 1 of the vendors available). – Git != GitHub ● Git = the protocol under the hood (e.g. CVS, Subversion) ● GitHub = a popular choice for your Git server
  • 18. Server + Clients Git Server John GitHub, BitBucket, Unfuddle, etc Paul George WWW TortoiseGit GitBox GitBox SmartGit (Poor Ringo...always left out.)
  • 19. Adding a file to a Git Repo ● AKA the “git add” command. ● “I want Git to watch this file for changes”. ● Do it once, after you create the file. ● Just because you MAKE a file, that DOESN'T mean Git watches it for changes. ● You MUST “add” the file to the Git repo. ● Let's look at an example....
  • 20. Committing a file ● “git commit” ● Git: take a snapshot of what this file looks like right now, for later reference. ● Do this instead of making .BAK files. ● The “committed” version of the file is stored locally. ● Let's look at an example...
  • 21. Pushing a file ● “git push” ● Git: “take the snapshot you made and copy it up to the Git server.” ● Do this whenever the file(s) is ready to be shared with your team, or ready for inclusion in the latest build, etc. ● Let's look at an example...
  • 22. Reverting a file ● AKA the “git revert” command. ● “Ack! I just made a huge mistake in this file. How do I get it back to what it used to look like?” ● Do this any time you messed up and need to undo a change. ● Under the hood, Git protocol is the same regardless of GUI client. The actual “thing” you press will vary between GUI clients. ● Here's an example in TortoiseGit...
  • 23. Branching ● “git branch” ● “I'm about to make a change to the site. I want a safe way to add my changes, but undo them quickly if something goes wrong.” ● Do this: Always. ● If you're making a change to the site, put it in its own branch. – Yes, even for that tiny change that's only in 1 file. ● Example time again...
  • 24. Merging Branches ● “git merge” ● “My new feature has been blessed by QA as bug free and is ready to be put on the Live server”. ● (Or combined with other features for the next build.) ● Let's look at an example...
  • 25. Common Practices ● Make a branch called “Master” for what the Production server should look like. ● Don't actually write code in this branch. – Write in other branches, then merge them into Master. ● Anytime I “pull from Master”, I get an exact copy of what's on the Live server. ● Make a branch called “QA”. As bugs are fixed, merge them into QA. ● When everything in QA looks correct, merge it into “master”. ● Don't be afraid to make “temporary branches” to try out new ideas. There is no harm in making/deleting new branches.
  • 26. Other Resources ● Pro Git Book ● FREE! ● http://git-scm.com/book ● Good info, examples are command-line. ● Tim Cunningham's Git presos and blog entries (cfmumbojumbo.com) ● CF Hour Podcast, episode 118 ● Lots of (short) tutorial videos on YouTube ● Google
  • 27. Questions? Comments? Ways to reach me... Email: nolan.erck@gmail.com Twitter: @southofshasta Blog: southofshasta.com Thanks!