Project

General

Profile

Actions

Git-maus » History » Revision 29

« Previous | Revision 29/44 (diff) | Next »
Dobbs, Adam, 24 February 2017 20:01


Git-maus

Besides Launchpad and bazaar MAUS has beta level support for git andgithub. At the moment code updates for the trunk cannot be accepted from github however, only via Launchpad and bazaar.

Development

Overview

This following section will guide you to:

  1. Create an account on GitHub
  2. Add an ssh key to your account
  3. Fork the MAUS repository on github into your personal github account
  4. Make a local copy on your computer of your fork of MAUS
  5. Create a new development branch within this repository locally
  6. Make and changes and commit these changes to this branch
  7. Push your development branch and these changes to your github MAUS fork
  8. Create a Jenkins test server job for your development branch
  9. Propose merging your changes back to the MAUS trunk via github

Step-by-step guide

  1. Create an account on github
  2. Add an ssh key to your account
  3. Fork the MAUS repository on github into your personal github account
    1. Go to MAUS github page and login into github
    2. Click "Fork" in the top right of the screen, selecting the option to fork to your own account
    3. Select your own account from the options that appear for where to fork MAUS
  4. Make a local copy (clone) on your computer of your fork of MAUS
    1. Copy the address of your new fork from github (something like git@github.com:jbloggs/maus.git, where jbloggs is your github username)
    2. Clone your repository:
      git clone git@github.com:jbloggs/maus.git
      

      where jbloggs is your github username.
  5. Create a new development branch within this repository locally
    1. cd into the directory created by the clone command (maus by default)
    2. Take a look at the branches present with:
      git branch -av
      
    3. Pull down the merge branch from your remote github repository into the new local repository:
      git checkout merge
      
    4. Create a new development branch in the local repository by forking the merge branch:
      git checkout -b my-feature-branch
      
    5. Observe the new state of your local repository with:
      git branch -av
      
  6. Make changes and commit these changes to the local development branch
    1. Edit some files, creating some wonderful new feature for the benefit of mousekind
    2. Stage the changes:
      git add AlteredFile1.cc AlteredFile2.cc
      
    3. Commit the changes:
      git commit -m 'My excellent new feature, closing issue ###'
      
  7. Push your development branch and these changes to your github MAUS fork
    git push origin my-feature-branch
    
  8. Create a Jenkins test server job for your development branch
    1. The MAUS test server can be found at: http://test.mice.rl.ac.uk
    2. Either email the head of MAUS requesting a test branch and giving your repository url and development branch id, or go the test server, create a new item, copying an existing git-based test job, and edit the configuration with your repository url and branch name
  9. Propose merging your changes back to the MAUS trunk via github
    1. Run the Jenkins test server job on your development branch
    2. When Jenkins has passed (and not before), return to your repository page on github and select my-feature-branch from the drop-down menu on the left
    3. Click the "Pull request" button to propose merging into the trunk
    4. Make sure your branch is comfortable for merging - if not, edit some more until it is, commit and push, then try again

Updated by Dobbs, Adam about 7 years ago · 29 revisions