The Git version control system can be used to check out your Branchable site, and make any changes you desire. Of course, you could just use the web interface to modify your site, but working from a git clone of your site lets you use your favorite editor, work offline, and own your data. So here's how:
Install git on your computer if you haven't already.
Visit your site's "Branchable" tab to look up the command to git clone it via ssh. Run that command to check it out.
But first, click on the "ssh keys" link, and in the form add the ssh keys for you and anyone else who can commit directly to the site. Note that being able to commit directly to the site is equivilant to being an administrator of the site -- only add keys you trust!
Now you have a git repository checked out for your site.
cdinto the repository. Edit files. Run
git push. Your changes will immediately show up on the web. That's really all there is to it.
bonus: the setup branch
We've recently added a feature that allows you to commit changes to the
ikiwiki.setup file for your site, too. That file lives in a special branch of your site, the setup branch. When you go to
Preferences -> Setup on the web and make changes, those changes are committed to the
ikiwiki.setup file for you. But you can also change it by hand:
Check out your site following the directions above.
git checkout setup-- this moves you to the setup branch. You can see the
Make whatever changes you want and
git commit. Don't worry about breaking it, your changes will be validated when you push.
git push origin setup-- and away it goes!
If it liked your changes, you'll see something like this, and the new configuration will be applied to your site:
Counting objects: 5, done. Delta compression using up to 2 threads. Compressing objects: 100% (3/3), done. Writing objects: 100% (3/3), 302 bytes, done. Total 3 (delta 2), reused 0 (delta 0) remote: Updating site to reflect setup changes... remote: generating wrappers.. remote: successfully generated /home/b-ikiwiki-hosting/public_html/ikiwiki.cgi remote: successfully generated /home/b-ikiwiki-hosting/source.git/hooks/post-update remote: refreshing wiki.. remote: done remote: From /home/b-ikiwiki-hosting/source remote: 68e1640..a33c123 setup -> origin/setup To ssh://firstname.lastname@example.org/ 68e1640..a33c123 setup -> setup
Some changes are not safe, and will be rejected. When this happens it's best to
git revert the change, or re-edit
ikiwiki.setup and undo the change. The error message will tell you what it didn't like. For example:
Counting objects: 5, done. Delta compression using up to 2 threads. Compressing objects: 100% (3/3), done. Writing objects: 100% (3/3), 323 bytes, done. Total 3 (delta 2), reused 0 (delta 0) remote: the following settings cannot be changed: remote: srcdir remote: destdir remote: url remote: the following plugins cannot be enabled/disabled: remote: openid remote: error: rejecting change to setup branch remote: remote: error: hook declined to update refs/heads/setup To ssh://email@example.com/ ! [remote rejected] setup -> setup (hook declined) error: failed to push some refs to 'ssh://firstname.lastname@example.org/'