Git is served by gitolite and uses gitweb as web interface.
Your individual access to gitolite can be tested by using:
ssh -T firstname.lastname@example.org
If it asks for a password, you should contact me (Rohit) to setup your private key pair
TCi77:~ tomcool$ ssh -T email@example.com hello tomcool, this is gitolite v2.0.3-43-g7b8866d running on git 18.104.22.168 the gitolite config gives you the following access: R W fwd_proj R W norio-code R W sectioner-server @R_ @W_ testing
- R means read access
- W means write access
- @R_ means read access but not explicitly defined (for example everybody is allowed)
If you have determined that you have access to a repository, you can clone it (get a local copy) using the following (example for testing repo):
git clone firstname.lastname@example.org:testing
This will create a folder called testing on your local computer where the contents will be cloned.
If changes have been made remotely, you can get the updates by running the following commands:
- If it’s the first time:
git pull origin master
Editing files is done normally but once the files have been edited, you need to add them to specify to git that you want those changes saved.
git add <file>
Note: SVN only requires this to be done once when the files are first created whereas git requires this to be done every time you want changes pushed
Committing the Changes
Once the files have been added you need to commit the files. This can be done using the following command:
git commit -m "a message to describe changes made"
Once this is done, the changes have been updated in the local history
Uploading To Server
The files still have not been updated on the remote computer. To do that, the following command needs to be run:
- The first time (after every clone):
git push origin master
- The following times:
Submodules are an advanced feature of git that allows users to actually clone a repository INSIDE another repository. This is extremely useful for shared code. git will also remember what revision was used so that if a newer version of the shared code exists but is incompatible you can still use the older code.
A very good (simple) tutorial can be found here:
The web interface is gitweb and it can be accessed here. The anonymous user and password are gitweb/gitweb. This allows you to see the repositories that have been declared as readable by the gitweb. Usually, you as user have more repositories enabled. To be able to view all the repositories that YOU have access to you first need to set a http password.
Setting a HTTP password
Setting up an http password is done in the following fashion:
ssh email@example.com htpasswd
and then following the onscreen instructions
Using said password
The website is accessed at the same location (gitweb) but you just input login (displayed when you run
ssh -T firstname.lastname@example.org) and your newly set password