Creating a LUG repo

From Wiki | LUG@UCLA
Revision as of 12:49, 8 November 2013 by Admin (Talk | contribs)

(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search

An official LUG@UCLA software project can/should use our public Git repository to share the code. This page describes how to create and use a repository.

Repository setup[edit]

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 the system (Gitolite). Also, provide the LUG admin with three bits of information:

  1. a repository name
  2. a very short description of the repository (no more than 10 words)
  3. your email address

Using the repository[edit]

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

Start working with your repository by cloning it, committing some changes, then pushing those changes:

$ git clone
$ cd my-project
$ echo "my super duper project!" >README.txt
$ git add README.txt
$ git commit --message="added a readme!"
$ git push origin master

If you already have a pre-existing local repository that you just want to push to your new LUG repository, just add a new remote and push all your branches to it:

$ cd path/to/existing/my-project
$ git remote add lug
$ git push --all lug
$ git push --tags lug

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