How to commit Your Code
We host the project on GitHub, so it is recommended you:
- Get a a GitHub account.
- Familiarize yourself with Git.
- Get an account on GitHub.
- Fork the ET:Legacy repository.
- Clone your copy locally with
git clone https://github.com/yourusername/etlegacy
.
Refer to Dealing with line endings to configure git for your platform.
On Windows:
$ git config --global core.autocrlf true
On Linux and macOS:
$ git config --global core.autocrlf input
Before you do git commit
, uncrustify your code. See Coding Conventions.
Unless you are about to commit a big change in the code use git pull --rebase
to update your local repo. In that way there won't be an unnecessary 'merge' commit when you do git push
.
- Do your changes and push to your remote fork of GitHub.
- Simply send us a pull request.
Before pushing, pulling code should be done, and ideally with rebasing:
$ git pull --rebase
Patches from other developers should be merged automatically using Github's pull requests. If that is not possible, make sure to add --author "First Last <email@example.com>"
flag. Only if you are using a small part of other developer's code or the developer does not have a Github account, add "patch by ..." to the commit message.
Example:
client: changed xyz, fixes #111
The first word in a commit message defines its category in our automatically generated changelog.
Main categories:
- client - committed code affects only the client part
- server - committed code affects only the server part
-
mod - committed code affects only the mod code
- ui
- cgame
- game
- general - committed code affects both
- misc - committed code is non-specific, e.g. code clean ups, documentation, ...
The last part of a commit message consists of a hash with a number linking the commit to the issue in the bugtracker.
Using keywords fixes and closes before the hash number will automatically close the issue in the bugtracker.
For example, for issue #1234
:
- Referencing:
refs #1234
or simply#1234
- Fixing:
fixes #1234
orcloses #1234
For release tag, the following formats are used:
- Release
- v%i.%i
- v2.71
- Patch level
- v%i.%i.%i
- v2.71.1
© ET: Legacy Team