{"thread":{"id":"23896","subject":"Maintaining an html branch","startedAt":"2010-05-25T06:43:22Z","lastAt":"2010-05-25T19:21:11Z","messageCount":2,"participants":["Christos Trochalakis","Jonathan Nieder"],"isPatch":false,"patchVersion":null,"patchTotal":null},"messages":[{"id":"142243","messageId":"AANLkTimMVn8fMVBmfNi4vR3kk3cXF2gq0Y9Ij5w3cl15@mail.gmail.com","threadId":"23896","inReplyTo":null,"subject":"Maintaining an html branch","fromName":"Christos Trochalakis","fromEmail":"yatiohi@ideopolis.gr","sentAt":"2010-05-25T06:43:22Z","receivedAt":"2010-05-25T06:43:22Z","isPatch":false,"sender":{"key":"yatiohi@ideopolis.gr","avatar":"https://gravatar.com/avatar/0a2086bcb916d6c7d3aab6edf1b697bc54d8f376d79d73b6deb96db048f7c64a?d=mp&s=160"},"body":"Hello,\n\nI would like to maintain an html branch for my repo, containing files\nunder my '_site/' dir that is not version controlled.\n\nBelow is a first draft that works, but as I am not really familiar\nwith git plumbing, I'd appreciate any comments on a better way or\nstyle to to write it.\n\n#!bash\njekyll --no-auto             # build the static website on _site/ dir\nrm .git/html.index\nexport GIT_INDEX_FILE=.git/html.index\ngit add -f _site\ntree_id=$(git write-tree --prefix=_site/)\nnew_commit=$(echo \"New website\"|git commit-tree $tree_id -p html)\ngit update-ref html $new_commit\nrm .git/html.index\n\nThanks,\nChris\n"},{"id":"142293","messageId":"20100525192111.GA7279@progeny.tock","threadId":"23896","inReplyTo":"AANLkTimMVn8fMVBmfNi4vR3kk3cXF2gq0Y9Ij5w3cl15@mail.gmail.com","subject":"Re: Maintaining an html branch","fromName":"Jonathan Nieder","fromEmail":"jrnieder@gmail.com","sentAt":"2010-05-25T19:21:11Z","receivedAt":"2010-05-25T19:21:11Z","isPatch":false,"sender":{"key":"jrnieder@gmail.com","avatar":"https://avatars.githubusercontent.com/u/281595?v=4"},"body":"Hi Christos,\n\nChristos Trochalakis wrote:\n\n> I would like to maintain an html branch for my repo, containing files\n> under my '_site/' dir that is not version controlled.\n[...]\n> rm .git/html.index\n> export GIT_INDEX_FILE=.git/html.index\n[...]\n\nLooks reasonable.  Way I suggest a simpler way?\n\nIf your goal is to publish an html branch with the rest of your\nbranches, I would recommend using a separate local repository that\npushes to the same remote repository[1].\n\nIf the goal is to stay under draconian disk quotas by not maintaining\ntwo local repositories, one with the web site checked out all the\ntime, I suggest using contrib/workdir/git-new-workdir.\n\nHope that helps,\nJonathan\n\n[1] See http://thread.gmane.org/gmane.comp.version-control.git/142831/focus=142865\nfor an example.\n"}]}