CONTRIBUTING.md 2.55 KB
Newer Older
1
# On Contributing
David Haynes's avatar
David Haynes committed
2

3
## git
David Haynes's avatar
David Haynes committed
4

5 6 7
First take a look at [github flow](https://guides.github.com/introduction/flow/)
as this page gives a good starting point on understanding how to work with `git`
in an open source repo.
David Haynes's avatar
David Haynes committed
8

9 10 11 12
**Note:**

You will need to be a member before making any contributions. Join the slack #go channel and ask nicely.

13
### Branches
David Haynes's avatar
David Haynes committed
14

15 16 17
Each branch off of the development branch serves one and only one purpose: to
add, modify, or remove features/bugs from Go. Our list of tasks can be found on
the issues page.
David Haynes's avatar
David Haynes committed
18

19
If you decide to take on an issue for Go you will need to work in a branch off
20
of the current development branch (ie. `2.3-dev` with 2.3 being the version in
21
    development).
David Haynes's avatar
David Haynes committed
22

23
This can be done with the following chain of `git` commands within `go/`:
David Haynes's avatar
David Haynes committed
24

25
    git pull
26
    git checkout 2.3-dev
27
    git checkout -B ##-shortdescription
David Haynes's avatar
David Haynes committed
28

29 30 31 32 33 34 35 36 37
**Note:**

Replace `##` with the issue number that you are working on, and replace
`shortdescription` with a few words (<=4) that in brief describe what the branch
does.

**Example:**

    git pull
38
    git checkout 2.3-dev
39 40 41 42
    git checkout -B 102-readmeUpdates

If you are working on something that does not have an issue please open a new
issue before creating your branch.
David Haynes's avatar
David Haynes committed
43 44 45

### Commits & Their Messages

46 47
It is important to commit more often than not such that if we run into issues we
can narrow down which commit started to cause issues.
David Haynes's avatar
David Haynes committed
48 49 50 51 52

Commit messages should follow the format:

#### Title -

53
Should fill in the blank:
David Haynes's avatar
David Haynes committed
54

55
    This commit ______
David Haynes's avatar
David Haynes committed
56

57 58 59 60 61 62 63
Additionally, if you are closing an issue include:

    (Closes #issue_number_here)

Example commit title:

    Complete the about page + TOS (Closes #36)
64

David Haynes's avatar
David Haynes committed
65
#### Description -
66

David Haynes's avatar
David Haynes committed
67 68 69 70
Bullet points of some highlights from the commit.

They don't have to be super serious (see any of my commits) though just a tad bit of info is nice.

71 72 73 74 75 76
Example commit description:

    - mostly talk about how great SRCT (and :dhaynes:) is
    - plus a short blurb on how we can ban you

[Example full commit](https://git.gmu.edu/srct/go/commit/db89af2e4ffd06a6044d3301a3f7a45ced74799a)
David Haynes's avatar
David Haynes committed
77

78
### Merging to the current development branch
79

David Haynes's avatar
David Haynes committed
80 81 82 83 84 85 86
Once you've finished work in a branch you will need to push your commits to gitlab.

    git push origin ##-branchname

`Origin` is gitlab.

Open a [merge request](https://git.gmu.edu/srct/go/merge_requests/new)
87 88 89
to start the process of getting your code into the repo. Your code wil be reviewed
by another member before being merged. Your code must pass our tests and include
in the description:
90

91
    Closes #issue_number_here
David Haynes's avatar
David Haynes committed
92

93
[Example pull request](https://git.gmu.edu/srct/go/merge_requests/25)