Set up git

  1. In Mac or Windows, install git from here.
  2. In SL5, type these commands:
    wget http://packages.sw.be/rpmforge-release/rpmforge-release-0.5.2-2.el5.rf.i386.rpm
    sudo rpm --import http://apt.sw.be/RPM-GPG-KEY.dag.txt
    sudo rpm -K rpmforge-release-0.5.2-2.el5.rf.i386.rpm
    sudo rpm -i rpmforge-release-0.5.2-2.el5.rf.i386.rpm
    sudo yum install git
  3. Create a GitHub account and ask Manuel or Frank to add you to the ODMB organization.
  4. Set up an SSH key (you will need one per user/per machine).
  5. Set up your name and email in this machine:
    git config --global user.name "XXX"
    git config --global user.email "xxx@xxx.xxx"
  6. Set up the following useful aliases:
    git config --global alias.co checkout
    git config --global alias.ci 'commit -a -m'
    git config --global alias.pu 'push origin master'
    git config --global alias.up 'pull origin master'
    git config --global alias.unstage 'reset HEAD'
  7. Highly recommended: read the first three chapters of the git book, and skim chapters 4 and 5.

Obtaining the ODMB firmware

  1. git clone git@github.com:odmb/odmb_ucsb_v2.git # Checks out the latest ODMB firmware
  2. cd odmb_ucsb_v2
  3. Open work/_info and delete everything after the fifth line (which should just be the letter "d"). It might already be blank.
  4. git update-index --assume-unchanged work/_info # Prevents from committing changes to work/_info
  5. For information about synthesizing or simulating the firmware, go here.

Example: new repository

First, create the repository in GitHub. Then, a typical sequence of commands would be:

NEW_REPO=XX
mkdir $NEW_REPO
cd $NEW_REPO
git init
git remote add origin git@github.com:user/NEW_REPO.git
## MODIFICATIONS ##
git add .
git ci "MODIFICATIONS"
git pu
git tag -a V00-00 -m "Comment"
git push origin --tags