Project

General

Profile

Git-maus » History » Version 24

Dobbs, Adam, 24 February 2017 18:56

1 1 Dobbs, Adam
h1. Git-maus
2
3 5 Dobbs, Adam
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.
4 1 Dobbs, Adam
5
h2. Development
6
7 24 Dobbs, Adam
The following section will guide you to:
8
9
# Create an account on GitHub
10
# Add an ssh key to your account
11
# Fork the MAUS repository on github into your personal github account
12
# Make a local copy on your computer of your fork of MAUS
13
# Create a new development branch within this repository locally
14
# Link this development branch to your MAUS repository on github 
15
# Commit changes to this branch
16
# Push these changes to github
17
# Propose merging your changes back to the trunk via github
18
19 2 Dobbs, Adam
h3. Set up a development branch
20
21 12 Dobbs, Adam
* 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
22
* Clone the MAUS repository as described at [[Install#Git-and-GitHub-beta-support| Obtaining MAUS via Git]]
23 2 Dobbs, Adam
* Fork the MAUS repository on github
24 19 Dobbs, Adam
** Go to "MAUS github page":https://github.com/mice-software/maus and login into github
25 2 Dobbs, Adam
** Click "Fork" in the top right of the screen, selecting the option to fork to your own account
26 20 Dobbs, Adam
    !http://micewww.pp.rl.ac.uk/attachments/8360/GitHubForkScaled.png!
27 22 Dobbs, Adam
** Select your own account from the options that appear for where to fork MAUS
28 2 Dobbs, Adam
* Add your fork as a new remote in your local MAUS git repository
29
** Copy the address of your new fork from github (something like @git@github.com:jbloggs/maus.git@, where jbloggs is your github username)
30
** Return to the terminal and navigate to the MAUS git repository created earlier
31
** Add your new forked repository using:
32
<pre>
33
git remote add my-fork git@github.com:jbloggs/maus.git
34
</pre>
35
where jbloggs is your github username.
36
* Fork the merge branch locally:
37
<pre>
38
git checkout merge
39
git checkout -b my-feature-branch
40
</pre>
41
* Push your local fork of the merge branch to your remote repository:
42
<pre>
43
git push my-fork my-feature-branch
44
</pre>
45
* Do some coding
46
* When ready add the files you have modified or created ready for committing:
47
<pre>
48
git add <files>
49
</pre>
50
* Commit your changes:
51
<pre>
52
git commit -m 'Some informative message about the changes'
53 1 Dobbs, Adam
</pre>
54 3 Dobbs, Adam
* Push the changes to your remote repository:
55
<pre>
56
git push my-fork my-feature-branch
57
</pre>
58
59
h3. Propose your branch for merging
60
61
* Run Jenkins test server job on your development branch (email the head of MAUS for help with setting up a test branch)
62
* When Jenkins has passed, return to your repository page on github and select @my-feature-branch@ from the drop-down menu on the left
63
* Click the "Pull request" button to propose merging into the trunk
64
* Make sure your branch is comfortable for merging - if not, edit some more until it is, commit and push, then try again