Skip to content

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

  1. Switch to develop:
git checkout develop
  1. Pull the latest changes:
git pull origin develop
  1. Create a new feature branch:
git checkout -b feature/your-feature-name
  1. Work on the feature, committing changes frequently:
git add .
git commit -m "Short description of changes"
  1. Push the feature branch to the remote repository:

    git push origin feature/your-feature-name
    

  2. Create a Pull Request to merge into develop:

Once the feature is complete, open a Pull Request (PR) to merge into develop.

  1. Ensure all tests pass, and reviewers approve the changes.

Merge the PR into develop using Squash and Merge to keep the commit history clean.

  1. 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:

  1. Fork the repository: Click "Fork" on the repository page to create your copy of the project in your GitHub account.

  2. Clone your fork:

git clone https://github.com/your-username/inteliver.git
cd inteliver
  1. Create a feature branch based on the main branch of your fork:
git checkout -b feature/your-feature-name
  1. Work on your changes, then commit them:
git add .
git commit -m "Short description of changes"
  1. 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
  1. Push your changes to your fork:
git push origin feature/your-feature-name
  1. Open a Pull Request from your fork's feature/your-feature-name branch to the develop branch of the original repository.