Skip to content

Latest commit

 

History

History
71 lines (51 loc) · 2.18 KB

README-GIT.md

File metadata and controls

71 lines (51 loc) · 2.18 KB

USING THE GIT REPOSITORY

Setup your own public repository

Your first step is to establish a public repository from which we can pull your work into the master repository. You have two options: use GitHub or other public site, or setup/use your own repository.

While you can use a private repository and utilize git format-patch to submit patches, this is discouraged as it does not facilitate public peer review.

Option 1: GitHub

  1. Setup a GitHub account (http://github.com/), if you haven't yet

  2. Fork the Coding Matters, Inc. Official Site repository (http://github.com/CodingMatters/OfficialSite)

  3. Clone your fork locally and enter it (use your own GitHub username in the statement below)

    % git clone git@github.com:<username>/OfficialSite.git
    % cd OfficialSite
  4. Add a remote to the canonical Coding Matters, Inc. Official Site repository, so you can keep your fork up-to-date:

    % git remote add OfficialSite https://github.com/CodingMatters/OfficialSite.git
    % git fetch OfficialSite

Option 2: Personal Repository

We assume you will use gitosis (http://git-scm.com/book/en/Git-on-the-Server-Gitosis) or gitolite (http://git-scm.com/book/en/Git-on-the-Server-Gitolite) to host your own repository. If you go this route, we will assume you have the knowledge to do so, or know where to obtain it. We will not assist you in setting up such a repository.

  1. Create a new repository
```sh
% git init
```
  1. Add an "origin" remote pointing to your gitosis/gitolite repo:

    % git remote add origin git://yourdomain/yourrepo.git
  2. Add a remote for the Coding Matters, Inc. Official Site repository and fetch it

    % git remote add OfficialSite https://github.com/CodingMatters/OfficialSite.git
    % git fetch OfficialSite
  3. Create a new branch for the Coding Matters, Inc. Official Site repository (named "OfficialSite/master" here)

    % git checkout -b OfficialSite/master OfficialSite/master
  4. Create your master branch off the OfficialSite branch, and push to your repository

    % git checkout -b master
    % git push origin HEAD:master