Difference between revisions of "Git Guidelines"
m (Fix unnecessary URL redirects) |
|||
Line 39: | Line 39: | ||
==== Notes ==== | ==== Notes ==== | ||
− | [1] Upstream is at https://github.com/minetest | + | [1] Upstream is at https://github.com/minetest/minetest |
− | [2] The team: https://github.com/minetest | + | [2] The team: https://github.com/orgs/minetest/people |
− | [3] For a GitHub pull request, this is easiest done by appending .patch to the pull request URL, | + | [3] For a GitHub pull request, this is easiest done by appending <code>.patch</code> to the pull request URL, getting into your project directory and doing <code>git am <patch></code>. Similarly for single commits. |
[4] Patches can be linked using a pastebin or by using GitHub (pull request or not). | [4] Patches can be linked using a pastebin or by using GitHub (pull request or not). |
Revision as of 10:12, 9 July 2018
This page is mostly directed to core developers with commit access to upstream repositories.
For instructions on basic usage, see Git.
For determining who is allowed to do what, see Organisation.
For guidelines about overall pull request quality, see Merging core pull requests to upstream.
Rules
Upstream branch rules
Feature freezes take effect in the master branch, and while the freeze is active, a separate development branch ("dev", or some other suitable name) is made into which pull requests are merged. It is then rebased onto master once the freeze is over. (It can be extended to be a more complete release model later, but this is the important part for now.) (https://forum.minetest.net/viewtopic.php?f=3&t=11172)
Note that 0.4.12 was freezed differently and the freeze will not be made in the same way in the future.
The minetest and minetest_game contain the stable-0.4 branch, which has to be updated to the latest stable 0.4 series version at each release.
Upstream pull requests and issues
- Don't mix multiple things in one commit. The same applies to codestyle cleanup.
- If a pull request or an issue does not get a response from its author in one month (when requiring more details), it is closed.
- If an issue is a duplicate, refer to the first one and close the later ones.
- People considering merging pull requests are not required to look anything up anywhere else than the pull request and its comments. If there is something blocking the merging of a pull request, the reason must be added as a comment to the pull request. This goes both ways: If you check a pull request to be mergeable, write a simple "+1" comment to it.
Upstream commit rules
- You can push something to upstream only if two members of the core team agree on it. (See Organisation.)
- Commit messages must start with a capital letter and be in the present tense (look at the commit log)
- Do not modify history older than 10 minutes
- Use rebase, not merge, to get linear history. [3]
- Do not rush with anything, unless our users' data is about to be corrupted otherwise
Rule 1 in practice
Tell people openly what you do, and if someone finds a problem in what you do, allow resolving to take its time.
If you have a small patch, fixing some compiler error or other trivial mistake, notify about fixing it on #minetest-dev, wait for 5...15 minutes and push it. To save time, you should notify when finding the problem, not when having it fixed. If someone asks something about it, delay pushing and link the patch [4] or tell whatever else people want to know.
Notes
[1] Upstream is at https://github.com/minetest/minetest
[2] The team: https://github.com/orgs/minetest/people
[3] For a GitHub pull request, this is easiest done by appending .patch
to the pull request URL, getting into your project directory and doing git am <patch>
. Similarly for single commits.
[4] Patches can be linked using a pastebin or by using GitHub (pull request or not).