Archive for September 16th, 2010

Writing a report part 2 : Sharing and editing your work online

When writing a report, a thesis, or any other academic paper, one can ask itself how could I share my files ? Indeed, LaTeX files can be divided between several files, and it might be painful to send them all by mail. Then, a website where everything is put might be helpful.

There are several ways to share your files online. But here I will focus on an easy way to get a working “google doc” version for everyone and enhanced for our purpose.

I think Github is all we need. Git is a distributed revision control system (If you don’t know what is a distributed revision control system, you can get a brief idea by looking here). And Github is a hosting site apparented to social network. With Github, you can get a repository for free where you can put your files, update them, and share them easily.

First, follow the steps at github to install git. Then, create an account at for free. After that, follow the steps described, which might be something like this :

cd ~ #a command to move into your /home/username directory
mkdir your_repository #a command to create your own repository in your /home/username directory
git init
etc, etc

But you will notice that the command “git push origin master” doesn’t work. Indeed, you need to get a ssh key. For this, in a terminal enter the following commands :

mkdir ~/.ssh
cd ~/.ssh
ssh-copy-id -i ~/.ssh/

Then, go into your account settings in Add a new key, untitled “” and copy there the content of you file ~/.ssh/ Here is a screenshot of what I get in my account settings :

After that, you will be able to create a file in your repository located in your /home/username directory, and to push it online in order to share it.

If you need further documentation, look here :
Git for the lazy

Here is a cheat-sheet, useful as a reminder :

If you have any question related to git, please, feel free to ask something. If you don’t understand something, I can update my post and try to clarify it.

Finally, here are some documentation to get git working with Mac OSX :
Git on mac OSX
and here is a screencast related to git with windows :
Git on windows

Since command line is not appreciated by everyone,
I will update this post and add something to use git
with a frontend.

%d bloggers like this: