Home Archives Search Feed About


Working Copy commit dialogWorking Copy commit dialog

In my previous post on setting up Jekyll to publish to GitHub Pages, I mentioned some alternative ways to post content to a Jekyll blog. Since I’m using GitHub Pages and the Git version control system, things aren’t as simple as dealing with a file and directories on my monitor device. Or is it? This is where Working Copy for iOS comes in.

My Mobile Blogging Setup

I use the following tools when blogging from iOS:

While Editorial and a faster input method are certainly not required, they do speed up my ability to create content.

An Aside: Version Control Systems

Before we dive in too deep, is helpful to understand what a distributed version control system like Git is. Basically, think of GitHub as the master or authoritative source of your content.

When you clone a repository to your local machine, you can make modifications. But if you want the master repository to reflect these changes, you have to send those changes back. In Git terminology, you are committing and pushing changes back to the master repository.

Similarly, if you want to reflect changes pushed to your master repository from other devices, you need to fetch those changes and merge them into your local repository. This allows you to see any modifications and also merge differences you may have made to the same article on multiple devices.

Setting up Working Copy

Working Copy can work with multiple repositories. So if you have multiple blogs, you can edit and maintain them all. Setup is fairly simple:

  1. Authorize access to your GitHub account, if you haven’t already (a one-time action)
  2. Clone a repository
  3. There is no Step 3

Working Copy Clone repository choiceWorking Copy Clone repository choice

Click the plus sign in the top right of the Repositories pane on the left side of the screen. Choose Clone Repository, select GitHub, then select the repository you’d like.

Working Copy Clone repository dialogWorking Copy Clone repository dialog

Adding/Modifying Content

Now that you have a local copy of a repository, you can add or edit content. Navigate to the location you want to add content in the repository browser pane on the left and then click the plus button. You can create a new text file, import images, or add other files to your site.

Working Copy Add item dialogWorking Copy Add item dialog

Working Copy changes pending uploadWorking Copy changes pending upload

Once you’re ready to push your changes, simply swipe left on your repository and choose Commit. You’ll also notice an option to Fetch. It’s best practice to fetch remote changes before you commit your changes, so I would fetching/merging and then committing.

Working Copy changes commit fetchWorking Copy changes commit fetch

Synchronizing Changes Made Elsewhere

Oftentimes, you may have made changes elsewhere. Maybe your desktop or another mobile device. In these cases, you need to update your local copy. Swipe left on your repository and choose Fetch, then swipe left again and choose Merge.

Unless you have conflicting changes, everything will automatically synchronize”. Once you’ve merged in remote changes to once fetched, your local repository is current.

A Concrete Example

This post was composed on an iPad. Screenshots were taken on the iPad, cleaned up using some editing tools, then optimized using Kraken.io. Images and the post were uploaded to GitHub via Working Copy.

Working Copy Rename FileWorking Copy Rename File

Once I was satisfied with the draft, I renamed the file to include the date in the file name. This tells Jekyll that the post is no longer a draft and should be published.

Posted on 2015-12-28   #blog     #howto     #github     #ios  






← Next post    ·    Previous post →