@@ -48,9 +48,49 @@ This will watch your source directory and continuously do the following on chang
4848The tests can (and should) be run against a sharded store. See [ store/test-store/README.md] ( ./store/test-store/README.md ) for
4949detailed instructions about how to run the sharded integrations tests.
5050
51- ## Commit messages
51+ ## Commit messages and pull requests
5252
5353We use the following format for commit messages:
5454` {crate-name}: {Brief description of changes} ` , for example: ` store: Support 'Or' filters ` .
5555
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