Git-maus » History » Revision 28
Revision 27 (Dobbs, Adam, 24 February 2017 19:46) → Revision 28/44 (Dobbs, Adam, 24 February 2017 19:56)
h1. Git-maus Besides Launchpad and bazaar MAUS has beta level support for git and"github":https://github.com/mice-software/maus. At the moment code updates for the trunk cannot be accepted from github however, only via Launchpad and bazaar. h2. Development h3. Overview This The following section sections will guide you to: # Create an account on GitHub # Add an ssh key to your account # Fork the MAUS repository on github into your personal github account # Make a local copy on your computer of your fork of MAUS # Create a new development branch within this repository locally # Make and changes and commit these changes to this branch # Push your development branch and these changes to your github MAUS fork # Create a Jenkins test server job for your development branch # Propose merging your changes back to the MAUS trunk via github h3. Step-by-step guide Set up a development branch # Create an account on "github":https://github.com/ # "Add an ssh key":https://help.github.com/articles/connecting-to-github-with-ssh/ to your account # Fork the MAUS repository on github into your personal github account ## Go to "MAUS github page":https://github.com/mice-software/maus and login into github ## Click "Fork" in the top right of the screen, selecting the option to fork to your own account !http://micewww.pp.rl.ac.uk/attachments/8360/GitHubForkScaled.png! ## Select your own account from the options that appear for where to fork MAUS # Make a local copy (clone) on your computer of your fork of MAUS ## Copy the address of your new fork from github (something like @git@github.com:jbloggs/maus.git@, where jbloggs is your github username) ## Clone your repository: <pre> git clone git@github.com:jbloggs/maus.git </pre> where jbloggs is your github username. # Create a new development branch within this repository locally ## cd into the directory created by the clone command (maus by default) ## Take a look at the branches present with: <pre> git branch -av </pre> ## Pull down the merge branch from your remote github repository into the new local repository: <pre> git checkout merge </pre> ## Create a new development branch in the local repository by forking the merge branch: <pre> git checkout -b my-feature-branch </pre> ## Observe the new state of your local repository with: <pre> git branch -av </pre> # Optional: push your local development branch into your remote github repository <pre> git push origin my-feature-branch </pre> # Make changes and commit these changes to the local development branch ## Edit some files, creating some wonderful new feature for the benefit of mousekind ## Stage the changes: <pre> git add AlteredFile1.cc AlteredFile2.cc </pre> ## Commit the changes: <pre> git commit -m 'My excellent new feature, closing issue ###' </pre> # Push your development branch and these ## Optional: push the changes to your github MAUS fork remote development branch: <pre> git push origin my-feature-branch </pre> # Create a h3. Propose your branch for merging * Run Jenkins test server job for on your development branch ## The MAUS test server can be found at: "http://test.mice.rl.ac.uk":http://test.mice.rl.ac.uk ## Either email (email the head of MAUS requesting for help with setting up 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 branch) # # Propose merging your changes back to the MAUS trunk via github ## Run the Jenkins test server job on your development branch ## * When Jenkins has passed (and not before), passed, return to your repository page on github and select @my-feature-branch@ from the drop-down menu on the left ## * Click the "Pull request" button to propose merging into the trunk ## * Make sure your branch is comfortable for merging - if not, edit some more until it is, commit and push, then try again