X-Git-Url: http://git.vanrenterghem.biz/git.ikiwiki.info.git/blobdiff_plain/0c377f2975b6e75f7ee0c7168fea2a1b300d99d0..d3e190ecec67ae45891d8aee3e3c8af9fc9f8cf9:/doc/rcs/git/discussion.mdwn diff --git a/doc/rcs/git/discussion.mdwn b/doc/rcs/git/discussion.mdwn index da162938a..f9d07891e 100644 --- a/doc/rcs/git/discussion.mdwn +++ b/doc/rcs/git/discussion.mdwn @@ -1,3 +1,10 @@ +## ikiwiki + git + + + +Here's an early page documenting setting up ikiwiki with git. It shouldn't be +this hard anymore. :-) See [[setup]] --[[Joey]] + ## Migrating from svn to git ## I'd like to migrate from svn to git, because git is better in general but also has some nice properties that go well together with my use of ikiwiki.. I only change it myself. I want a single git repo so that my website directory is self-contained so that I don't need to drag around a separate svn repository on my computer. Is it possible to use ikiwiki so that it only uses a git repository in the same dir as all files are stored and edited? @@ -15,14 +22,59 @@ Then, in my git repository, I added this `post-commit` hook to refresh the wiki: # to refresh when changes happen - #!/bin/sh - - # to refresh when changes happen - BASE="/path/to/base/dir" SETUPFILE="$BASE/ikiwiki.setup" UNDERLAYDIR="$BASE/underlay" ikiwiki --refresh --setup "$SETUPFILE" --underlaydir="$UNDERLAYDIR" --verbose -UlrikSverdrup \ No newline at end of file +Positives: + +* Containment: I only have the above `$BASE` directory to backup: it contains the srcdir and setup files. No external svn repository. This means that suddenly `git` and `ikiwiki` pair into a stand-alone self-contained wiki compiler kit. + +UlrikSverdrup (This is now crossposted to the above mentioned [website][ulrikweb]) + +[ulrikweb]: http://www.student.lu.se/~cif04usv/wiki/stuff/git.html + +> Note that while the post-commit hook above may work in some situations, it *will* fail (or at least be suboptimal) for web commits. If you're setting up ikiwiki and git for a wiki that allows web commits, you should use +> the repository and hook setups in documented in [[setup]] instead. With that method, you do end up with two separate git repos; but it's fine to only back one of them up. :-) --[[Joey]] + +## gitmanual + +Main use case I am trying to accomplish: Edit wiki pages offline. + +1. Imagine you're the administrator of the site and you want to checkout the wiki sources to give them some love while on a train journey. +2. Or you are writing a complex document and you want to simply use your favourite $EDITOR +3. Learn a little more about [git](http://git.or.cz/) + +# Workflow + +## on webconverger.org aka si.dabase.com aka hendry machine + +Wiki page created with [ikiwiki](http://ikiwiki.info). Example usb.mdwn [usb](http://webconverger.org/usb/) + +## on monty (my laptop) + + git-clone ssh://si.dabase.com/home/hendry/wikiwc/.git/ + +You might want to set some config variables like your email as this [tutorial](http://www.kernel.org/pub/software/scm/git/docs/tutorial.html) describes. + + echo "blah" >> usb.mdwn + +Then to commit: + + git-commit -a -m "added test" + +Send back: + + git push origin + +## on webconverger.org aka si.dabase.com aka hendry machine + +You should setup the "The git post-update wrapper" in the **ikiwiki.setup** file. + +Then the wiki should be up-to-date! :) + +# Ack + +Thanks to gitte on #git on Freenode and of course joeyh. Have a look at [[rcs/details]].