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