DEV Community

Roberson Miguel
Roberson Miguel

Posted on

3

Workflow com GIT

Se você procurar sobre qual o melhor a se fazer para manter seus trabalhos atualizados diariamente com o Git, você vai se deparar com git merge versus git rebase.

O que eu pude perceber é que boa parte dos posts falando sobre o assunto seguiam o seguinte workflow:

a) Pegar as novidades da master remota (origin/master)
$ git checkout master
$ git pull — rebase origin master

Obs.: os novos commits locais da master ficariam linearizados

b) Pegar as novidades remotas da sua branch
$ git checkout sua-branch
$ git pull — rebase origin sua-branch

c) Mesclar com rebase a master na sua branch
$ git rebase master

d) Ir comitando e repetindo os passos acima diariamente.
Assim, você vai pegar novidades da master e da sua branch remota.

e) Quando você terminar a funcionalidade/correção, fazer merge da sua branch na master com no-ff pra evitar o fast-forward.
$ git checkout master
$ git merge sua-branch — no-ff

Uma das empresas que propagava esse workflow em seus projetos comerciais era a brasileira Plataformatec comprada pelo Nubank.

Heroku

Build apps, not infrastructure.

Dealing with servers, hardware, and infrastructure can take up your valuable time. Discover the benefits of Heroku, the PaaS of choice for developers since 2007.

Visit Site

Top comments (0)

Image of Docusign

🛠️ Bring your solution into Docusign. Reach over 1.6M customers.

Docusign is now extensible. Overcome challenges with disconnected products and inaccessible data by bringing your solutions into Docusign and publishing to 1.6M customers in the App Center.

Learn more