Jump to content

Git repository on this server

From HW wiki
Revision as of 17:18, 24 November 2008 by Sojka (talk | contribs)

After an empty repository is created here for you by the admin, follow these instructions:

cd your/project
git init              # initializes git repository in your project's directory
git add .             # tells git to track all files in your project
git commit            # commits the added files to the repository
  • Then "connect" your repository to the one on this server (replace login by your login and repo-name by the name of repository created for you)
git remote add origin login@rtime.felk.cvut.cz:/var/git/repo-name.git
git config branch.master.remote origin
git config branch.master.merge refs/heads/master
  • Push your sources to the server
git push --all


What next?

Once the repository is not empty, everybody can use one of following commands to work with the code in the repository (it is not necessary add origin and configure remote branches as described above):

git clone login@rtime.felk.cvut.cz:/var/git/repo-name.git
git clone git://rtime.felk.cvut.cz/repo-name.git


For other hints refer to the git documentation or to this page.