@@ -48,9 +48,49 @@ This will watch your source directory and continuously do the following on chang
48
48
The tests can (and should) be run against a sharded store. See [ store/test-store/README.md] ( ./store/test-store/README.md ) for
49
49
detailed instructions about how to run the sharded integrations tests.
50
50
51
- ## Commit messages
51
+ ## Commit messages and pull requests
52
52
53
53
We use the following format for commit messages:
54
54
` {crate-name}: {Brief description of changes} ` , for example: ` store: Support 'Or' filters ` .
55
55
56
- If multiple crates are being changed list them all like this: ` core, graphql, mock, runtime, postgres-diesel: Add event source to store `
56
+ If multiple crates are being changed list them all like this: `core,
57
+ graphql: Add event source to store` If all (or most) crates are affected
58
+ by the commit, start the message with ` all: ` .
59
+
60
+ The body of the message can be terse, with just enough information to
61
+ explain what the commit does overall. In a lot of cases, more extensive
62
+ explanations of _ how_ the commit achieves its goal are better as comments
63
+ in the code.
64
+
65
+ Commits in a pull request should be structured in such a way that each
66
+ commit consists of a small logical step towards the overall goal of the
67
+ pull request. Your pull request should make it as easy as possible for the
68
+ reviewer to follow each change you are making. For example, it is a good
69
+ idea to separate simple mechanical changes like renaming a method that
70
+ touches many files from logic changes. Your pull request should not be
71
+ structured into commits according to how you implemented your feature,
72
+ often indicated by commit messages like 'Fix problem' or 'Cleanup'. Flex a
73
+ bit, and make the world think that you implemented your feature perfectly,
74
+ in small logical steps, in one sitting without ever having to touch up
75
+ something you did earlier in the pull request. (In reality, that means
76
+ you'll use ` git rebase -i ` a lot)
77
+
78
+ Please do not merge master into your branch as you develop your pull
79
+ request; instead, rebase your branch on top of the latest master if your
80
+ pull request branch is long-lived.
81
+
82
+ We try to keep the hostory of the ` master ` branch linear, and avoid merge
83
+ commits. Once your pull request is approved, merge it following these
84
+ steps:
85
+ ```
86
+ git checkout master
87
+ git pull master
88
+ git rebase master my/branch
89
+ git push -f
90
+ git checkout master
91
+ git merge my/branch
92
+ git push
93
+ ```
94
+
95
+ Allegedly, clicking on the ` Rebase and merge ` button in the Github UI has
96
+ the same effect.
0 commit comments