diff --git a/Contributing-to-Project%3A-Serenity.md b/Contributing-to-Project%3A-Serenity.md new file mode 100644 index 0000000..d0bbb91 --- /dev/null +++ b/Contributing-to-Project%3A-Serenity.md @@ -0,0 +1,158 @@ +Contributing to Project: Serenity is pretty straightforward. In this guide, you'll be able to use either GitBash directly or SourceTree. + +## Choose your workflow: + +* Terminal Workflow +* SourceTree Workflow + +# Terminal Workflow + +**Always make sure that you're using Git Bash in your repository location!** You can do so by either opening **SourceTree** and clicking **"Terminal"**, or navigating to your local Project: Serenity repository, right clicking, and selecting "Git Bash here". + +### 1. Pull Latest Changes + +`git checkout main` +`git pull origin main` + +### 2. Create a New Branch + +Always create a new branch for your task or feature. **Never commit directly to main.** + +**Branch Naming Convention:** + +The Types of Branches we use are as follows: + + * **Feature** + Format: feature/ + *Features will be used for adding new gameplay mechanics, UI updates, major changes.* + + * **Bugfix** + Format: bugfix/ + *Bugfixes will be used for fixing bugs that don't appear to be game/project breaking, and may not have been noticed early.* + + * **Hotfix** + Format: hotfix/ + *Hotfixes are for fixing issues that prevent features from functioning. For example, missing dependencies etc.* + + * **Task** + Format: task/ + *Tasks are smaller updates. For example, adding a new static mesh, implementing an animation etc.* + +When you're sure about the branch type, checkout the branch. As an example: + +`git checkout -b feature/build-mode-ui` + +**Branch Type/Name Examples:** +* feature/build-mode-ui +* bugfix/camera-rotation +* task/dialogue-update + +### 3. Make Your Changes + +Edit, test, and save your work. Don't forget to stage **only what's ready!** + +### 4. Write Clear Commit Messages + +`git add .` + +This stages **ALL** of your changes. You can selectively pick by typing the changes manually, for example: `git add Content/House.uasset` + +`git commit -m "feat: add placement preview system for buildings"` + +This commits the staged changes, ready to be pushed, along with your commit message. Be clear in what you're committing! + +### 5. Push Your Branch + +`git push -u origin feature/build-mode-ui` + +This will push your changes to the remote repository. + +### 6. Open a Pull Request (PR) + +We review all changes before they're merged into the main branch. This is to ensure all conflicts are resolved and we have no issues. It also gives you the peace of mind that your push won't break anything. **This is why it is so important that you push on your own branch.** + +1. Visit https://repo.forgeworksinteractive.com/Forgeworks_Interactive/ProjectSerenity and log in. +2. Click **Pull Requests** -> **New Pull Request** +3. Choose `main` as the base, and your custom branch to compare. +4. Add a title, description, and reviewer. Please add Math, Cow, and Seb to the reviewer list. + +# SourceTree Workflow + +### 1. Pull Latest Changes + +1. Open **SourceTree** +2. Select the **main** branch +3. Click **Pull** + +### 2. Create a New Branch + +1. Click **Branch** +2. Name your branch using our naming conventions (e.g., feature/map-system) found below +3. Ensure it's branching from `main` +4. Click **Create Branch** + +**Branch Naming Convention:** + +The Types of Branches we use are as follows: + + * **Feature** + Format: feature/ + *Features will be used for adding new gameplay mechanics, UI updates, major changes.* + + * **Bugfix** + Format: bugfix/ + *Bugfixes will be used for fixing bugs that don't appear to be game/project breaking, and may not have been noticed early.* + + * **Hotfix** + Format: hotfix/ + *Hotfixes are for fixing issues that prevent features from functioning. For example, missing dependencies etc.* + + * **Task** + Format: task/ + *Tasks are smaller updates. For example, adding a new static mesh, implementing an animation etc.* + +### 3. Make Your Changes + +Work on your files and test your changes. Save often! + +### 4. Stage & Commit Your Work + +1. Check only the files you want to commit +2. Write a descriptive commit message: + * `feat: added placement preview for buildings` +3. Click **Commit** + +### 5. Push Your Branch + +1. Click **Push** +2. Ensure your branch is selected +3. Click **Push** again + +### 6. Open a Pull Request (PR) + +We review all changes before they're merged into the main branch. This is to ensure all conflicts are resolved and we have no issues. It also gives you the peace of mind that your push won't break anything. **This is why it is so important that you push on your own branch.** + +1. Visit https://repo.forgeworksinteractive.com/Forgeworks_Interactive/ProjectSerenity and log in. +2. Click **Pull Requests** -> **New Pull Request** +3. Choose `main` as the base, and your custom branch to compare. +4. Add a title, description, and reviewer. Please add Math, Cow, and Seb to the reviewer list. + +# Best Practices + +### Do: + +* Pull `main` before starting any work +* Branch per task +* Commit small, meaningful chunks +* Write clear commit messages +* Test before you push +* Request PR's + +### Avoid: + +* Working off an outdated base +* Committing everything to `main` +* Dumping 100 changes in one commit +* Using "fix" or "stuff" as messages +* Breaking the build for others +* Merging without team input \ No newline at end of file