Skip to content
This repository was archived by the owner on Nov 9, 2022. It is now read-only.

Commit c1b5456

Browse files
committed
GitFlow branch test
1 parent 9ec0b7f commit c1b5456

File tree

1 file changed

+39
-97
lines changed

1 file changed

+39
-97
lines changed

CONTRIBUTING.md

Lines changed: 39 additions & 97 deletions
Original file line numberDiff line numberDiff line change
@@ -42,18 +42,26 @@ chances of your issue being dealt with quickly:
4242

4343
### Submitting a Pull Request
4444

45+
We use [GitFlow](https://www.atlassian.com/git/tutorials/comparing-workflows/gitflow-workflow) to manage the
46+
progress so multiple dev teams can work at the same time. Below is a description.
47+
4548
#### Fork MarkLogic Workflow
4649

47-
Fork the project [on GitHub](https://github.com/adamfowleruk/marklogicworkflow/fork) and clone
48-
your copy.
50+
First ask Adam Fowler for access to the project, passing him your GitHub account name. Then:-
4951

5052
```sh
51-
$ git clone git@github.com:adamfowleruk/marklogicworkflow.git
53+
$ git clone ssh://user@github.com/adamfowleruk/marklogicworkflow.git
5254
$ cd marklogicworkflow
53-
$ git remote add upstream git://github.com/adamfowleruk/marklogicworkflow.git
55+
$ git checkout -b develop origin/develop
5456
```
5557

56-
All bug fixes and new features go into the dev branch.
58+
The following rules apply:-
59+
- master is used only for releases
60+
- A develop branch is used to merge in changes between releases
61+
- Feature branches (feature-ISSUEID) branch off of the develop branch
62+
- Release branches are forked off of develop and called release-sprint-004, testing and builds are done, then merged with master AND then develop
63+
- Each release is tagged as v1 or v2 etc to match the sprint number until we catch up with the current MarkLogic release number, then we'll adopt v8-2-008 (MarkLogic V8.0-2, sprint 008)
64+
- Hotfix branches are taken off of master, fixed, then committed to master AND then develop
5765

5866
We ask that you open an issue in the [issue tracker][] and get agreement from
5967
at least one of the project maintainers before you start coding.
@@ -62,69 +70,30 @@ Nothing is more frustrating than seeing your hard work go to waste because
6270
your vision does not align with that of a project maintainer.
6371

6472

65-
#### Create a branch for your changes
73+
#### Create a branch for your feature
6674

67-
Okay, so you have decided to fix something. Create a feature branch
68-
and start hacking:
75+
Okay, so you have decided to add something. Create an issue on GitHub if you haven't already, as you'll need the ID.
76+
Now create a feature branch and start hacking:
6977

7078
```sh
71-
$ git checkout -b my-feature-branch -t origin/dev
79+
$ git checkout -b feature-ISSUEID develop
7280
```
7381

74-
We recommend you use the [GitFlow](https://www.atlassian.com/git/tutorials/comparing-workflows/gitflow-workflow) method to create and maintain branches.
82+
Now develop as normal:-
83+
84+
```sh
85+
$ git status
86+
$ git add myfile
87+
$ git commit
88+
```
7589

7690
#### Formatting code
7791

7892
We use [.editorconfig][] to configure our editors for proper code formatting. If you don't
7993
use a tool that supports editorconfig be sure to configure your editor to use the settings
8094
equivalent to our .editorconfig file.
8195

82-
#### Commit your changes
83-
84-
Make sure git knows your name and email address:
85-
86-
```sh
87-
$ git config --global user.name "J. Random User"
88-
$ git config --global user.email "[email protected]"
89-
```
90-
91-
Writing good commit logs is important. A commit log should describe what
92-
changed and why. Follow these guidelines when writing one:
93-
94-
1. The first line should be 50 characters or less and contain a short
95-
description of the change including the Issue number prefixed by a hash (#).
96-
2. Keep the second line blank.
97-
3. Wrap all other lines at 72 columns.
98-
99-
A good commit log looks like this:
100-
101-
```
102-
Fixing Issue #123: make the whatchamajigger work in MarkLogic 8
103-
104-
Body of commit message is a few lines of text, explaining things
105-
in more detail, possibly giving some background about the issue
106-
being fixed, etc etc.
107-
108-
The body of the commit message can be several paragraphs, and
109-
please do proper word-wrap and keep columns shorter than about
110-
72 characters or so. That way `git log` will show things
111-
nicely even when it is indented.
112-
```
113-
114-
The header line should be meaningful; it is what other people see when they
115-
run `git shortlog` or `git log --oneline`.
116-
117-
#### Rebase your repo
118-
119-
Use `git rebase` (not `git merge`) to sync your work from time to time.
120-
121-
```sh
122-
$ git fetch upstream
123-
$ git rebase upstream/dev
124-
```
125-
126-
127-
#### Test your code
96+
#### Test your code (pre-release mainly)
12897

12998
We are working hard to improve MarkLogic Workflow's testing. If you add new actions
13099
in process models then please write unit tests in the shtests directory.
@@ -137,53 +106,26 @@ $ ./all.sh
137106

138107
Make sure that all tests pass. Please, do not submit patches that fail.
139108

140-
#### Push your changes
141-
142-
```sh
143-
$ git push origin my-feature-branch
144-
```
145-
146-
#### Submit the pull request
147-
148-
Go to https://github.com/adamfowleruk/marklogicworkflow and select your feature branch. Click
149-
the 'Pull Request' button and fill out the form.
150109

151-
Pull requests are usually reviewed within a few days. If you get comments
152-
that need to be to addressed, apply your changes in a separate commit and push that to your
153-
feature branch. Post a comment in the pull request afterwards; GitHub does
154-
not send out notifications when you add commits to existing pull requests.
110+
#### Commit your complete feature
155111

156-
That's it! Thank you for your contribution!
112+
When the feature is complete and ready to be integrated back in to the develop branch:-
157113

114+
```sh
115+
$ git commit -m "Fixes #ISSUEID"
116+
$ git pull origin develop
117+
$ git checkout develop
118+
$ git merge feature-ISSUEID
119+
$ git push
120+
$ git branch -d feature-ISSUEID
121+
```
158122

159-
#### After your pull request is merged
160-
161-
After your pull request is merged, you can safely delete your branch and pull the changes
162-
from the main (upstream) repository:
163-
164-
* Delete the remote branch on GitHub either through the GitHub web UI or your local shell as follows:
165-
166-
```shell
167-
git push origin --delete my-feature-branch
168-
```
169-
170-
* Check out the dev branch:
171-
172-
```shell
173-
git checkout dev -f
174-
```
175-
176-
* Delete the local branch:
177-
178-
```shell
179-
git branch -D my-feature-branch
180-
```
123+
Only do the last command if the others complete successfully. You may have to merge conflicts.
181124

182-
* Update your dev with the latest upstream version:
125+
You're now done! Adding the 'Fixes #ISSUEID' comment to the last commit automatically closes the issue with a reference
126+
to your code.
183127

184-
```shell
185-
git pull --ff upstream dev
186-
```
128+
### Further information
187129

188130
[issue tracker]: https://github.com/adamfowleruk/marklogicworkflow/issues
189131
[.editorconfig]: http://editorconfig.org/

0 commit comments

Comments
 (0)