This guide aims to help you with contributing towards our group project. Feel free to ask me if you have any questions
-
Fork the Repository:
- Click on the "Fork" button at the top right of the GitHub repository page.
- This will create a copy of the repository under your GitHub account.
-
Clone Your Fork:
- Open your terminal.
- Run the following command, replacing
your-username
with your GitHub username:
git clone https://github.com/your-username/evotech.git
- Navigate to the Project Directory:
cd evotech
- Add Upstream Remote:
- To keep your fork up-to-date with the main repository, add the upstream remote to be the main repository:
git remote add upstream https://github.com/aston-cs2tp-evotech/evotech.git
- Create a Branch:
- Create a new branch for your feature or bug fix. Replace
feature-branch
with the feature or thing you're working on for this particular branch.
- Create a new branch for your feature or bug fix. Replace
git checkout -b feature-branch
-
Make Changes:
- Write your code, make improvements, or fix bugs.
-
Commit Your Changes:
- Stage your changes:
git add .
- Commit your changes with a descriptive message:
git commit -m "Your commit message here"
- Pull Latest Changes (Optional but Recommended):
- Before pushing your changes, pull the latest changes from the main repository:
git pull upstream main
- Resolve Conflicts (If Any):
- If there are conflicts, resolve them, then commit the changes.
- Push Your Changes:
- Push your changes to your forked repository:
git push origin feature-branch
-
Create a Pull Request:
- Visit your fork on your GitHub page.
- Click on the "New pull request" button.
- Set the base branch to
main
and the compare branch to your feature branch. - Write a descriptive title and comment for your pull request.
-
Request Review:
- Assign reviewers and request a review to notify others of your changes.
-
Address Feedback (if any):
- Make changes based on the feedback received.
-
Merge Pull Request:
- Once approved, your pull request will be merged into the main branch.
To keep your fork updated with the main repository:
- Fetch Latest Changes:
git fetch upstream
- Merge Changes into Your Branch:
git merge upstream/main
- Push Changes to Your Fork:
git push origin main