Skip to content

Commit 1501574

Browse files
thewtexkwrobot
authored andcommitted
Merge topic 'github-contributing'
abce991 DOC: Update CONTRIBUTING.md for GitHub
2 parents 2f19c1c + abce991 commit 1501574

3 files changed

Lines changed: 99 additions & 180 deletions

File tree

CONTRIBUTING.md

Lines changed: 44 additions & 86 deletions
Original file line numberDiff line numberDiff line change
@@ -15,13 +15,12 @@ Setup
1515

1616
Before you begin, perform initial setup:
1717

18-
1. Register for [Gerrit access] and possibly for [Git push access].
19-
2. Optionally download our
20-
[one page PDF desk reference](https://itk.org/Wiki/images/1/10/GitITKCheatSheet.pdf).
18+
1. [Register for a GitHub](https://github.com/join) account.
19+
2. Optionally download our [one page PDF desk reference](https://raw.githubusercontent.com/InsightSoftwareConsortium/ITK/master/Documentation/GitCheatSheet.pdf).
2120
3. Follow the [download instructions] to create a local ITK clone:
2221

2322
```sh
24-
$ git clone git://itk.org/ITK.git
23+
$ git clone https://github.com/InsightSoftwareConsortium/ITK
2524
```
2625

2726
4. Run the developer setup script [`SetupForDevelopment.sh`] to prepare your
@@ -31,33 +30,32 @@ Before you begin, perform initial setup:
3130
$ ./Utilities/SetupForDevelopment.sh
3231
```
3332

34-
Note that ITK defines some useful Git aliases, such as `pullall` or `prepush`,
35-
through the [`SetupGitAliases.sh`] script for general Git tasks in ITK.
33+
This script helps configure your GitHub fork remote, Git client-side hooks,
34+
and useful Git aliases. The default Git remote names for your fork and
35+
`InsightSoftwareConsortium/ITK` are `origin` and `upstream`, respectively.
36+
However, other remote names can be used. Note that ITK defines some useful
37+
Git aliases, such as `pullall` or `prepush`, through the
38+
[`SetupGitAliases.sh`] script for general Git tasks in ITK.
3639

37-
Note that if you answer `y` to the question "Do you want to test push access to
38-
itk.org? \[y/N\]:", you will most likely receive the following error message:
39-
"Permission denied (publickey). fatal: Could not read from remote repository.".
40-
Only a few experienced contributors have push access. Having push access is
41-
not necessary to contribute to ITK.
42-
43-
You may visit the *Pro Git: Setup* resource in [GitHelp] for further
40+
Visit the *Pro Git: Setup* resource in [GitHelp] for further
4441
information on setting up your local Git environment.
4542

4643
Workflow
4744
--------
4845

49-
ITK development uses a
50-
[branchy workflow](https://itk.org/Wiki/Git/Workflow/Topic) based on topic
51-
branches. Our collaboration workflow consists of three main steps:
46+
ITK development uses a branchy workflow based on topic branches.
47+
This corresponds to the *Fork & Pull Model* mentioned in the
48+
[GitHub flow guide]. Our collaboration workflow consists of
49+
three main steps:
5250

5351
1. Local Development
5452
* [Update](#update)
5553
* [Create a Topic](#create-a-topic)
5654
2. Code Review
57-
* [Share a Topic](#share-a-topic) (requires [Gerrit access])
55+
* [Share a Topic](#share-a-topic)
5856
* [Revise a Topic](#revise-a-topic)
5957
3. Integrate Changes
60-
* [Merge a Topic](#merge-a-topic) (requires [Gerrit push access])
58+
* [Merge a Topic](#merge-a-topic)
6159
* [Delete a Topic](#delete-a-topic)
6260

6361
Update
@@ -80,20 +78,20 @@ feature or fix to be developed given just the branch name.
8078
To start a new topic branch:
8179

8280
```sh
83-
$ git fetch origin
81+
$ git fetch upstream
8482
```
8583

86-
For new development, start the topic from `origin/master`:
84+
For new development, start the topic from `upstream/master`:
8785

8886
```sh
89-
$ git checkout -b my-topic origin/master
87+
$ git checkout -b my-topic upstream/master
9088
```
9189

92-
For release branch fixes, start the topic from `origin/release`, and by
90+
For release branch fixes, start the topic from `upstream/release`, and by
9391
convention use a topic name starting in `release-`:
9492

9593
```sh
96-
$ git checkout -b my-topic origin/release
94+
$ git checkout -b my-topic upstream/release
9795
```
9896

9997
(*You may visit the* Pro Git: Basic Branching *resource in [GitHelp] for
@@ -133,15 +131,16 @@ Share a Topic
133131
-------------
134132

135133
When a topic is ready for review and possible inclusion, share it by pushing
136-
to Gerrit. Be sure you have registered for [Gerrit access][Access].
134+
to GitHub and opening a *pull request* on the *InsightSoftwareConsortium/ITK*
135+
upstream repository.
137136

138137
Checkout the topic if it is not your current branch:
139138

140139
```sh
141140
$ git checkout my-topic
142141
```
143142

144-
Check what commits will be pushed to Gerrit for review:
143+
Check what commits will be pushed to GitHub for review:
145144

146145
```sh
147146
$ git prepush
@@ -150,25 +149,19 @@ Check what commits will be pushed to Gerrit for review:
150149
Push commits in your topic branch for review by the community:
151150

152151
```sh
153-
$ git gerrit-push
152+
$ git review-push --force
154153
```
155154

156155
(*If the topic adds data see [this note](Documentation/Data.md#push).*)
157156

158-
or if you started the topic from the release branch:
159-
160-
```sh
161-
$ git push gerrit HEAD:refs/for/release/my-topic
162-
```
163-
164-
Find your change in the [ITK Gerrit] instance and add [ITK reviewers].
157+
Optionally, discuss the change by opening a topic on [ITK's Discourse].
165158

166159
Revise a Topic
167160
--------------
168161

169-
If a topic is approved during Gerrit review, skip to the
170-
[next step](#merge-a-topic). Otherwise, revise the topic and push it back to
171-
Gerrit for another review.
162+
Usually, a topic goes through several revisions in the review process.
163+
Once a topic is approved during GitHub review, proceed to the
164+
[next step](#merge-a-topic).
172165

173166
Checkout the topic if it is not your current branch:
174167

@@ -194,8 +187,7 @@ To revise commits further back on the topic, say the `3`rd commit back:
194187

195188
(*Substitute the correct number of commits back, as low as `1`.*)
196189

197-
Follow Git's interactive instructions. Preserve the `Change-Id:` line at the
198-
bottom of each commit message.
190+
Follow Git's interactive instructions.
199191

200192
Return to the [Share a Topic](#share-a-topic) step to share the revised topic.
201193

@@ -218,65 +210,36 @@ the next day's nightly dashboard to ensure there are not any regressions. If
218210
there are any new warnings or errors, submit a follow-up patch as soon as
219211
possible.
220212

221-
When a patch is submitted, macOS-Clang, Windows-MSVC, and Linux-GCC builds will
222-
start. Once they have finished, the build robots will make a comment on the
223-
patch with a link to their results visualized in CDash and mark the patch set
224-
as `Verified +1` or `Not Verified -1`. The results are submitted by the Kitware
225-
Build Robot Gerrit user.
226-
227-
Builds can be spawned by adding the following comments to a patch set in Gerrit.
228-
229-
* `request build: all`
230-
* `request build: osx`
231-
* `request build: linux`
232-
* `request build: windows`
233-
* `request build: python`
234-
* `request build: power8`
235-
* `request build: cpp11`
236-
* `request build: cpp14`
237-
238213
Merge a Topic
239214
-------------
240215

241-
**Only authorized developers with [Git push access] to `itk.org` may perform
242-
this step.**
243-
244-
After a feature topic has been reviewed and approved in Gerrit, merge it into
245-
the upstream repository.
216+
**Only authorized developers with GitHub merge permissions execute this step.**
246217

247-
Checkout the topic if it is not your current branch:
248-
249-
```sh
250-
$ git checkout my-topic
251-
```
252-
253-
Merge the topic, which is originally forked off the `master` branch, to
254-
`master` branch:
255-
256-
```sh
257-
$ git gerrit-merge
258-
```
218+
After a feature topic has been reviewed and approved in GitHub, ITK
219+
maintainers will merge it into the upstream repository via the GitHub user
220+
interface.
259221

260222
(*If the merge conflicts follow the printed instructions to resolve them.*)
261223

262-
For bug fixes that are ready to be included in the next patch release, please
263-
post a message in the [ITK discussion] for assistance.
224+
For bug fixes that are ready to be included in the next patch release, make a
225+
comment on the pull request which states the topic should be merged to the
226+
`release` branch.
264227

265-
Here are the recommended steps to merge a topic to both release and master
266-
branches, assuming the topic branch is forked off the release branch:
228+
Here are the recommended steps to merge a topic to both `release` and `master`
229+
branches, assuming the topic branch is forked off the `release` branch:
267230

268231
```sh
269232
$ git checkout release
270233
$ git merge --no-ff my-topic
271-
$ git push origin release
234+
$ git push upstream release
272235
```
273236

274237
and do:
275238

276239
```sh
277240
$ git checkout master
278241
$ git merge --no-ff release
279-
$ git push origin master
242+
$ git push upstream master
280243
```
281244

282245
to merge the `release` branch back to `master`.
@@ -301,24 +264,19 @@ Delete the local topic branch:
301264

302265
The `branch -d` command works only when the topic branch has been correctly
303266
merged. Use `-D` instead of `-d` to force the deletion of an unmerged topic
304-
branch (**warning**: you could lose commits).
267+
branch (*warning*: you could lose commits).
305268

306269

307270

308271
[README]: Documentation/README.md
309-
[Access]: Documentation/Access.md
310272
[download instructions]: Documentation/Download.md
311-
[Gerrit access]: Documentation/Access.md
312-
[Gerrit push access]: Documentation/Access.md
313273
[GitHelp]: Documentation/GitHelp.md
314-
[Git push access]: Documentation/Access.md
315274
[UpdatingThirdParty]: Documentation/UpdatingThirdParty.md
316275

317276
[`SetupForDevelopment.sh`]: https://github.com/InsightSoftwareConsortium/ITK/blob/master/Utilities/SetupForDevelopment.sh
318277
[`SetupGitAliases.sh`]: https://github.com/InsightSoftwareConsortium/ITK/blob/master/Utilities/DevelopmentSetupScripts/SetupGitAliases.sh
319278

320-
[ITK discussion]: https://discourse.itk.org/
321-
[ITK Gerrit]: http://review.source.kitware.com/p/ITK
322-
[ITK reviewers]: http://review.source.kitware.com/#/admin/groups/9
279+
[ITK's Discourse]: https://discourse.itk.org/
323280

324281
[Git]: http://git-scm.com
282+
[GitHub flow guide]: https://guides.github.com/introduction/flow/index.html

Documentation/Access.md

Lines changed: 0 additions & 47 deletions
This file was deleted.

0 commit comments

Comments
 (0)