Intro

There are some ways to work with other people using Git, below I demonstrate a few.

Centralized Workflow


The most basic flow. The developers use a shared repository to keep the code. If dev A updates the repository, then others dev can't without pulling it. Let's say dev B tried to update, an error will appear to him, and he will only be abble to push after he get the new information with the pull command.

Integration-Manager Workflow


This one works great on plataforms such as Github, where is easy to created and share repositories.

  1. The maintainer pushes to the public repository;
  2. The contributor clones to its own repository;
  3. The contributor pushes to its public repository;
  4. The contributor sends an email or something communicating the alterations;
  5. The mantainer adds the contributor's repository as a remote and merge locally;
  6. The mantainer pushes to the main repository.

Dictator and Lieutenants Workflow


This one is less common and it's better for really big projects. It's used, for example, on Linux project.
Off-topic info: Lieutenants comes from french: lieu (place) + tenant (holder).

Ending

I leaned this content in the Pro Git Book, which you can find here: https://git-scm.com/book/en/v2

Author Of article : Murillo Pinheiro de Oliveria Read full article