Simple Git Flow for New Features¶
Here's the git flow and branches guideline for inteliver developers and maintainers.
Main Branches¶
main
: Stable, production-ready code.develop
: Latest development version, contains all merged features.
Feature Branches¶
Create a new branch for each feature or bug fix from the develop
branch.
Naming Convention:¶
feature/short-description
Example: feature/url-image-processing
Steps for Creating a New Feature Branch¶
- Switch to develop:
git checkout develop
- Pull the latest changes:
git pull origin develop
- Create a new feature branch:
git checkout -b feature/your-feature-name
- Work on the feature, committing changes frequently:
git add .
git commit -m "Short description of changes"
-
Push the feature branch to the remote repository:
git push origin feature/your-feature-name
-
Create a Pull Request to merge into
develop
:
Once the feature is complete, open a Pull Request (PR) to merge into develop
.
- Ensure all tests pass, and reviewers approve the changes.
Merge the PR into develop
using Squash and Merge to keep the commit history clean.
- Delete the feature branch locally and remotely:
git branch -d feature/your-feature-name git push origin --delete feature/your-feature-name
External Contributions (Forking Workflow)¶
For external contributors, follow this workflow:
-
Fork the repository: Click "Fork" on the repository page to create your copy of the project in your GitHub account.
-
Clone your fork:
git clone https://github.com/your-username/inteliver.git
cd inteliver
- Create a feature branch based on the main branch of your fork:
git checkout -b feature/your-feature-name
- Work on your changes, then commit them:
git add .
git commit -m "Short description of changes"
- Keep your fork up to date with the upstream main branch:
git remote add upstream https://github.com/inteliver/inteliver.git
git fetch upstream
git checkout main
git pull upstream main
git checkout feature/your-feature-name
git rebase main
- Push your changes to your fork:
git push origin feature/your-feature-name
- Open a Pull Request from your fork's
feature/your-feature-name
branch to thedevelop
branch of the original repository.