Git-maus » History » Revision 22
Revision 21 (Dobbs, Adam, 24 February 2017 18:29) → Revision 22/44 (Dobbs, Adam, 24 February 2017 18:30)
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. Set up a development branch
* Set up an account on "github":https://github.com/ and "add an ssh key":https://help.github.com/articles/connecting-to-github-with-ssh/ to your account
* Clone the MAUS repository as described at [[Install#Git-and-GitHub-beta-support| Obtaining MAUS via Git]]
* Fork the MAUS repository on github
** 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
* Add your fork as a new remote in your local MAUS git repository
** Copy the address of your new fork from github (something like @git@github.com:jbloggs/maus.git@, where jbloggs is your github username)
** Return to the terminal and navigate to the MAUS git repository created earlier
** Add your new forked repository using:
<pre>
git remote add my-fork git@github.com:jbloggs/maus.git
</pre>
where jbloggs is your github username.
* Fork the merge branch locally:
<pre>
git checkout merge
git checkout -b my-feature-branch
</pre>
* Push your local fork of the merge branch to your remote repository:
<pre>
git push my-fork my-feature-branch
</pre>
* Do some coding
* When ready add the files you have modified or created ready for committing:
<pre>
git add <files>
</pre>
* Commit your changes:
<pre>
git commit -m 'Some informative message about the changes'
</pre>
* Push the changes to your remote repository:
<pre>
git push my-fork 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