Git distributed workflows afford you to contribute to a remote Git repository with all the developers within the same project. Git allows distributed environment where a project can have multiple remote repositories.

Integration-manager model

  1. Each developer has write access to their own public repository and read access to everyone else’s.
  2. To contribute to that project, you create your own public clone (fork) and push your changes to it.
  3. Then, you can send a request (i.e. PR) to the maintainer of the main project to pull in your changes, the maintainer tests your changes and merges them with the main repository.

Dictator and lieutenants model

Lieutenants: Various integration managers oversee certain parts of the repository. Benevolent dictator: All Lieutenants have one integration manager who makes final decision about the project.

The benevolent dictator pushes from their directory to a reference repository (official version of the project) from with all the collaborators need to pull.

Private small team

Contribute to a private small project involves a few key steps

  1. Clone the repository to your local machine.
  2. Work on your changes in a local branch. Ensure commits are logically separated change sets with clear and structured commit messages.
  3. Before pushing, fetch the latest changes from the remote repository and merge them into your local branch and resolve any conflicts.

Back to parent page: Git

DevOps VCSGitGit_Distributed_Workflow

Reference: