Skip to content

Instantly share code, notes, and snippets.

@alexyoung
Created November 27, 2011 23:41
Show Gist options
  • Select an option

  • Save alexyoung/1398458 to your computer and use it in GitHub Desktop.

Select an option

Save alexyoung/1398458 to your computer and use it in GitHub Desktop.

Revisions

  1. Alex Young created this gist Nov 27, 2011.
    5 changes: 5 additions & 0 deletions Makefile
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,5 @@
    publishdocs:
    $(eval PARENT_SHA := $(shell git show-ref -s refs/heads/gh-pages))
    $(eval DOC_SHA := $(shell git ls-tree -d HEAD docs | awk '{print $$3}'))
    $(eval COMMIT := $(shell echo "Auto-update docs." | git commit-tree $(DOC_SHA) -p $(PARENT_SHA)))
    @git update-ref refs/heads/gh-pages $(COMMIT)