Skip to content

Instantly share code, notes, and snippets.

@yipo
Created January 20, 2014 20:12
Show Gist options
  • Save yipo/8528109 to your computer and use it in GitHub Desktop.
Save yipo/8528109 to your computer and use it in GitHub Desktop.
CB-VCS Adapter: version control with Git --> version control by appending date to filenames.
# Chang-Biau Version Control System Adapter v1.0
# Author: Yi-Pu Guo (YiPo)
# License: MIT
FILE = thesis/thesis_guoyp.tex
# fill your own filename above.
fp = $(basename $(FILE))
fs = $(suffix $(FILE))
revisions = \
$(addprefix $(fp), \
$(addsuffix $(fs), \
$(shell git tag)))
cb-vcs: $(revisions)
-rm $(FILE)
$(fp)%$(fs):
git cat-file blob $*:$(FILE) > $@
clean:
-rm $(fp)?*$(fs)
git checkout $(FILE)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment