Search This Blog

Saturday, July 07, 2007

I Gited my PhD

From the beginning of writing my PhD thesis I've been using RCS to store revision of my tex files. I even add settings to my GVIM that Ctrl+S make a new revision. Recently, when I started to finishing Phd ;), I found lack information about files other than main tex files (tabels, figures etc). I also wanted to be sure that change prepered on one machines can be easily reach from other ones. I decided to use something more complex than RCS and chose git. It is very easy to send commits to my academic server (git push ssh://user@server/~/PhD) and getting the latest version from it (git pull ssh://user@server/~/PhD). However, I found that it isn't so easy to edit files on my server. Directory doesn't change after pushing it from remote repository. My first work around was on the server first committing changes - it means reverting files to state before pushing, and latter reverting to previous version -it means last version committed from remote machine. Does it sound complicated? Yes! So I was trying find the other way. Today I found it. On remote machine I do: git add filename(if needed) git commit -a git push ssh://user@server/~/PhD Later on server: git reset --hard HEAD And now I has the same files at server and any remote machines. Nice. And I need only ssh to do it.