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 remotasgit 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