Skip to content

Instantly share code, notes, and snippets.

@Fawers
Last active January 8, 2018 20:15
Show Gist options
  • Save Fawers/b9af9dd0f6c43c07d1c6 to your computer and use it in GitHub Desktop.
Save Fawers/b9af9dd0f6c43c07d1c6 to your computer and use it in GitHub Desktop.

Referência rápida para branching

Supondo branch de nome BRANCH

  • Para listar branches remotas:

    • git branch -r
  • Para verificar se existe localmente:

    • git branch
  • Caso exista localmente:

    • git checkout BRANCH para trabalhar nele
  • Caso exista remotamente:

    • git fetch --all para resgatar as atualizações remotas
    • git checkout BRANCH para trabalhar nele
  • Caso não exista:

    • git checkout -b BRANCH para criar e trabalhar nele

Resgate e envio de atualizações

git pull origin BRANCH / git push origin BRANCH

Exclusão do branch

git branch -d BRANCH

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment