Skip to content

Commit

Permalink
Merge pull request #381 from TheDuckCow/contributing-additions
Browse files Browse the repository at this point in the history
  • Loading branch information
StandingPadAnimations committed Mar 8, 2023
2 parents c42face + 53cd867 commit 36e12c6
Showing 1 changed file with 35 additions and 0 deletions.
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

0 comments on commit 36e12c6

Please sign in to comment.