WPATX Meet-up Notes — March 06, 2012 — Hosted by CoSpace
A look at Git, Github, Gists, how they interact, and why they will effect how you write and share code for WordPress
Can you feel the disturbance in the Force? The Storm of SXSW Interactive is almost upon us. Downtown streets are starting to morph into that unhelpful amalgam that causes the natives to ask ourselves, “Do I really care about this year’s big party on 6th?”
But that worry is for next week — tonight, in our 1st WordPress meetup of March, Pat Ramsey and Nick Batik look at Git, Github, Gists, and how they change how you write code for WordPress.
Austin WordCamp will be May 19th. We need speakers, sponsors and volunteers! Learn more and sign up at: http://2012.austin.wordcamp.org/
WordPress SXSW party has been announced. Space is limited, so RSVP soon!
An Introduction to ‘git’ – ‘github’ – and ‘gist’
git: refers to itself as ‘local-branching-on-the-cheap’ Git is a free and open source distributed version control system designed to handle everything from small to very large projects with speed and efficiency. Git is Git, is strictly a command-line tool. Git is easy to learn and has a tiny footprint with lightning fast performance. It outclasses SCM tools like Subversion, CVS, Perforce, and ClearCase with features like cheap local branching, convenient staging areas, and multiple workflows.
If you are interested, you can learn Learn Git in your browser for free with Try Git.
github: offers Developers an online way to collaborate on code over distributed teams. GitHub is a good tool for both code review, and code management for open source and private projects. Some developers refer to Gethub as a social codebase/code repository. According to Wikipedia ” GitHub provides a Web-based graphical interface and desktop as well as mobile integration. It also provides access control and several collaboration features such as bug tracking, feature requests, task management, and wikis for every project.“
You can set up a GitHub account at: github.com.
gist: lets you instantly share code, notes and snippets on GitHub Gist is a simple way to share snippets and pastes with others. All gists are git repositories, so they are automatically versioned, forkable and usable as a git repository.
Pat explained that he and Nick were working on a project together, and needed a way to work collaboratively without overwriting each other’s code. They created a repository of all the files they were going to be working on so that they could check out files that represented the most recent version. github will mark all changes in the history, compare versions, and update the files to reflect the changes. When you view a file you can see what has been added or deleted from a file. You have control over what gets updated, so you can choose to merge just added lines of a file.
In addition to collaborative work, GitHub allows you to follow different users/developers as well as follow projects under development.
The development community tends to police projects so if someone posts malicious or bad code, someone else will likely correct it.
Another interesting note about github: it offers you a distributed version control system/repository; you have a local version of the repository that you can commit and make sure it’s working properly before you commit to the main repository
Subversion/SVN: is the non-distributed version control
You can use gist to post code, browse other gists, and even use the code on your WordPress site (there are plugins you can install to do this). There are no private gists. For an example, check out Bill Erickson’s gist for a popular posts widget.
Bitbucket is another git hosting service.
If you use git/github/gist in your WordPress development process, please post in the comments how you’ve found it useful.
In closing, Pat and Nick mentioned that this talk just scratched the surface on the potential for Git and WordPress Development. They used the balance of the meet-up for how-to’s, examples, etc.