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

Version Control for fun and Profit

Ben Balter
August 19, 2014

Version Control for fun and Profit

WordPress DC

Ben Balter

August 19, 2014
Tweet

More Decks by Ben Balter

Other Decks in Technology

Transcript

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

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

    forums Documentation Communities Managing WordPress installs Hacking on WordPress-core
  3. 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
  4. ! ' 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>
  5. 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
  6. 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
  7. ! 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
  8. 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