Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Added some guides on commits in CONTRIUTING.md #381

Merged
merged 4 commits into from
Mar 8, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
35 changes: 35 additions & 0 deletions CONTRIBUTING.md
Expand Up @@ -171,6 +171,41 @@ One other detail: MCprep uses git lfs or Large File Storage, to avoid saving bin

Run into other gotchas? Please open a [new issue](https://github.com/TheDuckCow/MCprep/issues)!


## Commit Messages
Git commits should explain why a change was made, because the diff will show the changes made. For example, instead of writing:
```
Added ability to "import" MTL files
```

Instead do:
```
Added the ability to "import" MTL files
MCprep's file explorer shows both OBJs and MTLs, and sometimes users end up clicking
MTL files. This brings a quality of life improvement to change the extension
if the file selected is an MTL, since MTLs share the same name as their corresponding
OBJ files
```

The first line is a summary of the changes, and should be less then 50 characters. The rest should justify the changes. Convince us why these changes are important and why they've been made this way.

Git won't automatically wrap messages either, so each line should have a limit of 72 characters.

Here's a template some MCprep developers found that can help (modified for simplicity) by using # to define which is the limit Git can display for each line:
```
# Title: Summary, imperative, start upper case, don't end with a period
# No more than 50 chars. #### 50 chars is here: #
# Body: Explain *what* and *why* (not *how*). Include task ID (Jira issue).
# Wrap at 72 chars. ################################## which is here: #
```
Add this to a file called .gitmessage, and then execute the following command:
`git config --local commit.template /path/to/.gitmessage`

To use for each commit, you can use `git config --local commit.verbose true` to tell Git to perform a verbose commit all the time for just the MCprep repo.

## IDE Support
If you're using an IDE, it's recommened to install `bpy` as a Python module. In my (StandingPad) experiance, the [fake-bpy package](https://github.com/nutti/fake-bpy-module) seems to be the best.

Expand Down