Using git@school
git is available for you to store and share your projects.
The is a local git-server - a virtual machine running on top of bren. It is known on bren.
User creation
Note:The following instructions requires you to perform them on bren, i.e. log-in to bren.
In order to be able to store projects on git-server you need to be created on the server.
If you haven't done it already, you have to create a ssh key-pair - see Linux hints how to create your ssh key-pair.
Next issue this command:
$ cd /home/git-server $ mkdir <your username> $ chmod 700 <your username> $ cd <your username> $ cp ~/.ssh/id_rsa.pub <your username>.pub $ vi projectname
For every <your username> you will of-course put in your login on bren.
when the editor opens add these lines:
repo <your reponame> RW = <list of logins that shall have read and write access>
following the rules as pointed out on this configuraiton page and its subpages.
You can add several usernames if needed - you should just provide one username.pub file per username in the same directory.
Finally you write a mail to klausk (at) iha [dot] dk asking to have the entries created on the git-server. When you receive an email back everything should be working.
Create the remote project
On bren create a project directory in your home directory or below that.
cd into the directory.
Issue:
$ git init $ touch afile $ git add afile $ git commit -m 'a message'
Now you have an empty git repository containing one empty file - afile.
To push the project onto the git-server issue:
$ git remote add origin git@git-server:<your-projectname> $ git push origin master </source< If no errors your project is now master on the git-server and you can push changes or pull earlier versions.