Git-maus » History » Version 5
Dobbs, Adam, 22 December 2016 17:14
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 | 2 | Dobbs, Adam | h2. Obtaining MAUS |
6 | |||
7 | 1 | Dobbs, Adam | * Optional: set up an account on github and add an ssh key |
8 | * Clone the MAUS repository using: |
||
9 | <pre> |
||
10 | git clone git@github.com:mice-software/maus.git |
||
11 | </pre> |
||
12 | * Move into the @maus@ directory and check the branches present with: |
||
13 | <pre> |
||
14 | git branch -av |
||
15 | </pre> |
||
16 | The following branches should be present @master@ (the release branch), @merge@, @release-candidate@ |
||
17 | * Switch to the branch desired using e.g. for the release: |
||
18 | <pre> |
||
19 | git checkout master |
||
20 | </pre> |
||
21 | * Build MAUS as usual |
||
22 | 2 | Dobbs, Adam | |
23 | h2. Development |
||
24 | |||
25 | 3 | Dobbs, Adam | h3. Set up a development branch |
26 | |||
27 | 2 | Dobbs, Adam | * Set up an account on github and add an ssh key |
28 | * Clone the MAUS repository as described above |
||
29 | * Fork the MAUS repository on github |
||
30 | ** Go to MAUS github page and login into github |
||
31 | ** Click "Fork" in the top right of the screen, selecting the option to fork to your own account |
||
32 | * Add your fork as a new remote in your local MAUS git repository |
||
33 | ** Copy the address of your new fork from github (something like @git@github.com:jbloggs/maus.git@, where jbloggs is your github username) |
||
34 | ** Return to the terminal and navigate to the MAUS git repository created earlier |
||
35 | ** Add your new forked repository using: |
||
36 | <pre> |
||
37 | git remote add my-fork git@github.com:jbloggs/maus.git |
||
38 | </pre> |
||
39 | where jbloggs is your github username. |
||
40 | * Fork the merge branch locally: |
||
41 | <pre> |
||
42 | git checkout merge |
||
43 | git checkout -b my-feature-branch |
||
44 | </pre> |
||
45 | * Push your local fork of the merge branch to your remote repository: |
||
46 | <pre> |
||
47 | git push my-fork my-feature-branch |
||
48 | </pre> |
||
49 | * Do some coding |
||
50 | * When ready add the files you have modified or created ready for committing: |
||
51 | <pre> |
||
52 | git add <files> |
||
53 | </pre> |
||
54 | * Commit your changes: |
||
55 | <pre> |
||
56 | git commit -m 'Some informative message about the changes' |
||
57 | 1 | Dobbs, Adam | </pre> |
58 | 3 | Dobbs, Adam | * Push the changes to your remote repository: |
59 | <pre> |
||
60 | git push my-fork my-feature-branch |
||
61 | </pre> |
||
62 | |||
63 | h3. Propose your branch for merging |
||
64 | |||
65 | * Run Jenkins test server job on your development branch (email the head of MAUS for help with setting up a test branch) |
||
66 | * When Jenkins has passed, return to your repository page on github and select @my-feature-branch@ from the drop-down menu on the left |
||
67 | * Click the "Pull request" button to propose merging into the trunk |
||
68 | * Make sure your branch is comfortable for merging - if not, edit some more until it is, commit and push, then try again |