Skip to content

Latest commit

 

History

History
58 lines (40 loc) · 1.04 KB

File metadata and controls

58 lines (40 loc) · 1.04 KB

05 — Repositórios remotos, GitHub e Pull Requests

Verificando remotes

git remote -v

Adicione um remote quando necessário:

git remote add origin https://github.com/usuario/repositorio.git

Atualizando referências remotas

git fetch origin

git fetch baixa referências remotas sem integrar automaticamente as alterações na branch atual.

Para buscar e integrar alterações:

git pull

Publicando uma branch

git push -u origin feat/minha-feature

O -u associa a branch local à branch remota correspondente.

Pull Request

Um Pull Request (PR) propõe a integração de uma branch em outra. Em um fluxo comum:

feat/minha-feature
       ↓ push
GitHub
       ↓ Pull Request
review / ajustes
       ↓ merge
main

Um bom PR deve explicar:

  • o que mudou;
  • por que a mudança foi necessária;
  • como validar;
  • riscos ou pontos de atenção, quando existirem.

Pull Requests tornam a colaboração mais segura porque permitem revisão antes da integração.