How to Use Git for the IESP Project

Use the space bar or right arrow for next slide,
left arrow to back up. Use 'a' key to toggle between single page and slide modes.

Introduction

Git is a distributed configuration managment systems. It was developed by the Linux kernel group and is used by a number of other open-source development projects. These notes are a "cookbook" on how to use git on the team project in our course, for the International Etruscan Sigla Project (IESP) software system.

The workflow here is based on Vincent Driessen's article A successful Git branching model. (See also local files .pptx slides, .pdf of slides, and .pdf summary chart.) The main difference are:

Jobs for me do do:

I think I have set up about everything that we will need on the server. (It is a pretty complicated set of jobs, though.) I have tested all of the steps currently described in this file, and they worked, so long as there were no merge or push conflicts. I still would like to do the following:

User Identification and Preferences

Do this once on each computer that you will be using as a workstation.

  1. Set up ssl to use use public key authentication between your workstation and the project server sis.cs.fsu.edu. See the separate notes on how to do this.

    If you skip this step you will be prompted for you HTTP password (not you Unix login password) at many points.

  2. Add to the file that sets your local environment variables (in ~/.profile on Linux systems)

    export GIT_SSL_NO_VERIFY=true

    If you do not set either this or http.sslVerify as explained below, then when you try to clone from the repository using HTTPS you will see a message like the following:

    error: SSL certificate problem, verify that the CA cert is OK. Details:
    error:14090086:SSL routines:SSL3_GET_SERVER_CERTIFICATE:certificate verify failed ...
  3. Set up your global git configuration variables as follows, substituting your name, e-mail address, and favorite editor for mine.

    $ git config --global user.name "Ted Baker"
    $ git config --global user.email "baker@cs.fsu.edu"
    $ git config --global core.editor emacs
    $ git config --global http.sslVerify false

    You should see the results in your local file ~/.gitconfig, as follows:

    $ cat ~/.gitconfig
    [user]
    name = Ted Baker
    email = baker@cs.fsu.edu
    [core]
    editor = emacs
    

    See git-config man page for the complete list of configuration options.

Create a Local Repository

Do the following once, replacing baker by your own username. For the password, give the HTTP password assigned to you for use with trac etc. in this course. (Not your Unix login password.)

You should now have a local directory iesp that contains a clone of the repository /home/git/iesp.git at sis.cs.fsu.edu. You should see something like the following for the status and current branches of the repository.

$ cd iesp
$ git status
# On branch develop
nothing to commit (working directory clean)
$ git branch -a
* develop
  remotes/origin/HEAD -> origin/empty
  remotes/origin/develop
  remotes/origin/master

The branch branch "master" is reserved for major releases. The only branch you should touch is "develop", and you should only do that remotely, using git http-push according to the directions further below.

I have written a bash shell-script to do the above, called iespclone. You may find it convenient to copy this into your ~/bin directory, chmod 750 iesplcone, and make sure ~/bin is in your bash search path (PATH). It assumes the name "iesp" for your local repository, but you can change that by editing the script.

Working on A New Feature

To develop a new feature, do the following.

I have created a bash shell script hack to automate these steps, based on git-o-mator by Jusin Pease. It seems to work with ssh, but will need further adaptation to use git http-push It assumes you are working on branch "mybranch", but you can change that by providing your branch name as parameter to hack on.

Error Recovery

References