Git-maus » History » Revision 27
Revision 26 (Dobbs, Adam, 24 February 2017 19:45) → Revision 27/44 (Dobbs, Adam, 24 February 2017 19:46)
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 The following 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 # Propose merging your changes back to the MAUS trunk via github h3. 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> <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> ## Optional: push the changes to your remote development branch: <pre> git push origin my-feature-branch </pre> h3. Propose your branch for merging * Run Jenkins test server job on your development branch (email the head of MAUS for help with setting up a test branch) * When Jenkins has 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