Upgrade to Pro — share decks privately, control downloads, hide ads and more …

Version Control for fun and Profit

19d03ecc1ff5da1a5e63a3ddaa2d84c2?s=47 Ben Balter
August 19, 2014

Version Control for fun and Profit

WordPress DC

19d03ecc1ff5da1a5e63a3ddaa2d84c2?s=128

Ben Balter

August 19, 2014
Tweet

Transcript

  1. ! Version control for fun and profit Ben Balter government.github.com

    government@github.com
  2. ! What’s GitHub?

  3. ! The world’s largest code-sharing platform " Founded 2008 !

    VC Funded $100M # Hubbers 232 $ Users 7M % Projects 15M
  4. Ways GitHub <3’s WordPress Collaborating on plugins & Themes Technical

    forums Documentation Communities Managing WordPress installs Hacking on WordPress-core
  5. ! 45,000 WordPress projects on GitHub

  6. ! Version Control Tracking “who made what change when” since

    1972
  7. ! " The Commit Timestamp | Description | Author |

    Changes
  8. A commit in the wild

  9. ! & Git & Git & Git & Git &

    Git & Git
  10. A few Git basics Installing Git mac.github.com windows.github.com ! Create

    Repositories $ git init [project-name] Creates a new local repository with the specified name ! $ git clone [url] Downloads a project and its entire version history Show changes $ git status Lists all new or modified files to be commited ! $ git diff Shows file differences not yet staged ! Make Changes $ git add [file] Snapshots the file in preparation for versioning ! $ git commit -m “[message]” Records file snapshots permanently in version history
  11. ! ' History * 2d96cfe - (HEAD, tag: v3.1.1, origin/master,

    origin/HEAD, master) :gem: bump (43 minutes ago) <Ben Balter> * f4b446b - remove stray backtick (44 minutes ago) <Ben Balter> * 83599e3 - Merge branch 'master' of https://github.com/benbalter/g-man (46 minutes ago) <Ben Balter> |\ | * 42514ea - Merge pull request #61 from devscott/laxco (50 minutes ago) <Ben Balter> | |\ | | * 072d9b5 - Adding in additional entry for La Crosse County, WI (54 minutes ago) <Scott Sloan> | |/ * | 1e95d95 - remove unresolvable domains (46 minutes ago) <Ben Balter> * | 1a8645a - remove uwyo.edu/CES (86 minutes ago) <Ben Balter> |/ * 70410ba - Merge pull request #60 from jpmckinney/canada (2 hours ago) <Ben Balter> |\ | * a77ad43 - Use consistent comments for Canada hosts (2 hours ago) <James McKinney> | * 1776e45 - Add more Canadian hosts (2 hours ago) <James McKinney> * | 05211a0 - Merge pull request #58 from mitio/bulgarian-government-domains (3 hours ago) <Ben Balter> |\ \ | * | fe8f862 - Add Bulgaria's government main domain (3 hours ago) <Dimitar Dimitrov> | |/ * | 85d0c7b - Merge pull request #59 from mitio/fix-readme-typos (3 hours ago) <Ben Balter> |\ \ | |/ |/| | * f558a90 - Add missing word in the readme (3 hours ago) <Dimitar Dimitrov>
  12. ! GitHub

  13. % A Repository

  14. ' History

  15. ( Forks

  16. ) Issues

  17. * Pull Requests

  18. + Diff

  19. ! Managing WordPress deployments using Git

  20. The one command you need to know git clone git://develop.git.wordpress.org/

  21. The one command you need to know git clone https://github.com/WordPress/WordPress

    other ^
  22. The one repository you need to know github.com/markjaquith/WordPress-Skeleton

  23. WordPress Skeleton

  24. The one repository you need to know github.com/wp-cli/wp-cli other ^

    probably should ^
  25. None
  26. ! Authoring (and using) WordPress Plugins and Themes with GitHub

  27. Where GitHub fits in for users • Check if your

    favorite plugins are already on GitHub • Watch the repository to provide feedback on proposed features • Find a typo or confusing language in the documentation • Open issues (not support requests) if you notice problems
  28. Where GitHub fits in 
 for developers and designers •

    Host your plugin or theme on GitHub, encourage contributors • Documentation • Translations • Issues • When ready, push to the WordPress Plugin Repository
  29. A few Starting Points Plugins github.com/tommcfarlin/WordPress-Plugin-Boilerplate ! Themes github.com/roots/roots github.com/Automattic/_s

  30. ! A few tools to get you started Sync WordPress

    content to GitHub
 github.com/benbalter/wordpress-github-sync ! Push from GitHub to WordPress Plugin Repo github.com/benbalter/Github-to-WordPress-Plugin-Directory-Deployment-Script ! Convert GitHub Wikis to WordPress Readmes github.com/benbalter/github-wiki-to-wordpress-readme ! An Example plugin github.com/benbalter/wp-document-revisions
  31. To Review • Version Control - “who made what change

    when” • Git - A distributed version control system, not dissimilar from SVN • GitHub - Super awesome (open source) code host • For Deployments - All your code are belong to Git • For plugin/theme authors - Grow communities around your code • For users - Find your favorite plugins on GitHub and contribute
  32. ! Version control for fun and profit Ben Balter government.github.com

    government@github.com