Project

General

Profile

Git-maus » History » Version 25

Dobbs, Adam, 24 February 2017 19:24

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