Version Control
• As much about transitioning a website
between states as it is recording changes.
• Deployment is quicker and safer.
• Changes can be easily “rolled” back.
• A google example
Subversion or .Git
• SVN solves the problem by saving a
“revision” with each change committed.
Developers then can update code to a
specific #
• Git Solves the problem by tracking the
differences between commits
Subversion or .Git
• .Git is a “distributed” model with less
server overhead and better performance
• .Git makes complex workflows much easier
to manage
• Github.com is a great community of
projects and developers sharing code.
• Little functions that make life easy
(examples later)
Getting Started:What
you need
• A command line tool like iTerm or Putty
• RSA Key Pair: https://help.github.com/articles/generating-ssh-keys
• Some Code
Deployment
On your webhost, you’ll need ssh access or you will
need a tool that can deploy via FTP ( Beanstalk ? )
$ git clone git@github.com:mikevanwinkle/My-WP-
Site.git
$ git pull origin master
Development: Example
[on your local]
$ git branch dev
$ git checkout dev
[make some changes]
$ git commit -am “Making my dev changes”
$ git push origin dev [pushes the new branch up]
[on production site]
$ git pull origin dev
$ git checkout dev
Development: Example
[on your local]
$ git branch feature-1
$ git checkout feature-1
[make some changes]
$ git commit -am “Making my dev changes”
$ git push origin feature-1 [pushes the new branch up]
$ git checkout master
$ git merge feature-1
$ git commit -am “merge feature-1 with master”
$ git push origin master