Branching
Each of our finished mods has a main branch (sometimes called master depending on the age of the repo) as well as a development branch. The development branch is where all changes are made prior to the next release. It is acceptable to push directly to the development branch but a better way is to branch from development and make your changes there. Then, a pull request can be created, reviewed, and merged back into development.
Never commit/push directly to the main branch. It is there as a stable/production branch which should always mirror the latest release. The only time main is ever modified is when development is merged in just before a new release.
Note: If a mod hasn't had any releases yet, what we tend to do is just push to main up until the first release. Then, a development branch is created and main is no longer used for direct commits/pushes.
Branching from development
When creating a new branch off of development, it's good to use a name that describes the change you're going to make. One example would be if you wanted to work on writing a feature which adds a new Thimble composition that makes entities explode. Examples of bad names would be newbranch
, thimble
, splode
, or otherwise any other name that doesn't describe exactly what you'll be doing. A better name would be something like feature/explosion-composition
.
Using feature/
at the beginning of the branch name also lets others know that what you're writing is a feature. You can also use other prefixes like bugfix/
or refactor/
.
Last updated
Was this helpful?