Difference between revisions of "Git repositories"

From Wiki | LUG@UCLA
Jump to: navigation, search
Line 5: Line 5:
 
If you don't already have an SSH key pair, you can follow [[Secure Shell#Using SSH keys | these steps]] to generate one.
 
If you don't already have an SSH key pair, you can follow [[Secure Shell#Using SSH keys | these steps]] to generate one.
  
Give your public SSH key to a LUG admin so they can add your key to Gitolite. Also, provide the LUG admin with 1) a repository name and 2) a short ~5 word description of the repository.
+
Give your public SSH key to a LUG admin so they can add your key to Gitolite. Also, provide the LUG admin with 1) a repository name and 2) a short description of the repository (no more than ~7 words).
  
 
== Using the repository ==
 
== Using the repository ==

Revision as of 16:21, 7 June 2013

Git is a free and open source distributed version control system, and our preferred method of sharing source code. LUG@UCLA hosts members' Git repositories at //linux.ucla.edu/git/. This page provides an overview of the steps necessary to get your project hosted.

Repository setup

If you don't already have an SSH key pair, you can follow these steps to generate one.

Give your public SSH key to a LUG admin so they can add your key to Gitolite. Also, provide the LUG admin with 1) a repository name and 2) a short description of the repository (no more than ~7 words).

Using the repository

First, verify your repository has been created by accessing //linux.ucla.edu/git/. If your repository name is "my-project", then your push/pull address will be: git@linux.ucla.edu:my-project.git . Your repository will also have a public pull-only address at //linux.ucla.edu/git/my-project.git.

If you have a pre-existing local repository that you just want to push to your new LUG repository, run the following command:

$ cd path/to/existing/my-project
$ git push --all git@linux.ucla.edu:my-project.git
$ git push --tags git@linux.ucla.edu:my-project.git

Remember, you can pull the repository from anywhere, but you can only push from your personal computer (or wherever you generated your keys).