Welcome to the convo-insight-platform project! We're excited that you want to contribute. This guide will walk you through the process of contributing to our GitHub repository.
- Setting Up
- Understanding the Branch Structure
- Making Changes
- Submitting Your Contribution
- After Submission
- For Repository Owners: Reviewing and Merging Contributions
-
Create a GitHub Account: If you don't already have one, go to GitHub and sign up for a free account.
-
Fork the Repository:
- Go to the main page of the convo-insight-platform repository.
- In the top-right corner, click the "Fork" button.
- This creates a copy of the repository in your GitHub account.
-
Clone Your Fork:
- On your fork's page, click the "Code" button and copy the URL.
- Open your terminal or command prompt.
- Navigate to where you want to store the project.
- Run:
git clone [URL you copied]
- This downloads the repository to your local machine.
-
Set Up Remotes:
- Change into the project directory:
cd convo-insight-platform
- Add the original repository as a remote:
git remote add upstream https://github.com/rampal-punia/convo-insight-platform.git
- This allows you to keep your fork updated with the main project.
- Change into the project directory:
Our project uses a three-tier branch structure:
master
: The stable, production-ready branch.development
: The main branch for integrating features and fixes.- Feature branches: Created from
development
for specific features or fixes.
As a contributor, you'll primarily work with development
and feature branches.
-
Sync Your Fork: Before creating a new branch, ensure your fork is up to date:
git checkout development git fetch upstream git merge upstream/development git push origin development
-
Create a New Feature Branch:
- Create and switch to a new branch based on
development
:git checkout -b feature/my-new-feature development
- Use a descriptive name for your branch, like
feature/add-python-libraries
orfix/typo-in-readme
.
- Create and switch to a new branch based on
-
Make Your Changes:
- Open the project in your preferred text editor or IDE.
- Make the changes you want to contribute.
- Save your changes.
-
Commit Your Changes:
- Stage your changes:
git add .
- Commit the changes:
git commit -m "Add a brief, descriptive commit message"
- Stage your changes:
-
Keep Your Feature Branch Updated: Regularly update your feature branch with the latest changes from
development
:git checkout development git pull upstream development git checkout feature/my-new-feature git rebase development
-
Push Your Changes:
- Push your branch to your fork:
git push origin feature/my-new-feature
- Push your branch to your fork:
-
Create a Pull Request:
- Go to your fork on GitHub.
- Click on "Pull requests" and then the "New pull request" button.
- Set the base repository to the original project and the base branch to
development
. - Set the head repository to your fork and the compare branch to your feature branch.
- Click "Create pull request".
- Add a title and description for your pull request, explaining your changes.
- Click "Create pull request" again to submit.
- The repository maintainers will review your pull request.
- They may ask for changes or clarifications in the pull request comments.
- If changes are requested, make them in your local branch, commit, and push them. The pull request will update automatically.
- Once approved, your changes will be merged into the
development
branch!
As a repository maintainer, here's how you can review and merge contributions:
-
Access Pull Requests:
- Go to your repository on GitHub.
- Click on the "Pull requests" tab.
-
Review the Pull Request:
- Click on the pull request you want to review.
- Review the changes in the "Files changed" tab.
- Leave comments or request changes if needed.
-
Run Tests (if applicable):
- Ensure all automated tests pass before merging.
-
Merge the Pull Request:
- If you're satisfied with the changes and all checks pass:
- Click the "Merge pull request" button.
- Choose the merge method (usually "Merge pull request" for a standard merge).
- Click "Confirm merge".
- If you're satisfied with the changes and all checks pass:
-
Delete the Branch (optional):
- After merging, you can delete the contributor's branch if it's no longer needed.
-
Update Local Repository:
- In your local repository:
git checkout development git pull origin development
- In your local repository:
-
Updating Master:
- Periodically, when
development
is stable:git checkout master git merge development git push origin master
- Periodically, when
Remember to thank your contributors for their efforts!
We hope this guide helps you contribute to the convo-insight-platform project. If you have any questions, feel free to open an issue in the repository. Happy contributing!