Below is how to commit to the repository.
Note: Please don't use GitHub desktop. If you have it, delete it please (please). The steps to use the terminal are much easier to debug for both me and yourself!
Start by cloning the repository to your local machine. Make a new folder entitled "WEAP" or something similar so you have all the club-related code in one location:
git clone https://github.com/WE-Autopilot/Red-Team
cd Red-MPC-ControllerWhen commiting, it is important that you create a feature branch to avoid merge conflicts. Always work on a dedicated feature branch instead of main or dev. Use a descriptive name prefixed with feature/. Below is an example of how to make a feature branch:
#This new branch will track your changes related to a specific feature.
git checkout -b feature/your-feature-name # e.g., feature/user-authStage and commit your changes with clear, concise messages:
git add . # Stage all changes (or specify individual files)
git commit -m "Describe your changes briefly but meaningfully"Run this command after commiting to sync your branch with the latest version of dev:
git pull origin devPush your feature branch to the remote repository:
git push origin feature/your-feature-nameNavigate to GitHub and create a Pull Request (PR) from your feature branch to the dev branch.
I need to add tests later......... Don't worry about it for now
After your PR is approved merge it into dev Pull the latest dev branch locally:
git checkout dev
git pull origin devDelete the remote feature branch via GitHub after merging.
git branch -d feature/your-feature-nameClean up outdated remote references:
git fetch --prune