Github – trabalhando com branch´s

Posted on by : admin Tags: ,

#HOTFIX
git checkout -b hotfix #cria um hotfix
git add .
git commit -a -m “”

#ATUALIZA HOTFIX NO MASTER
git checkout master #muda para o MASTER depois de comitado o hotfix
git merge hotfix #a partir do MASTER da um merge com hotfix
git push #commit das alterações do HOTFIX e MASTER

#ATUALIZA HOTFIX NO DEVELOP
git checkout develop #muda para o DEVELOP depois de comitado o hotfix
git merge hotfix #a partir do DEVELOP da um merge com hotfix
git push #commit das alterações do HOTFIX e DEVELOP

#DESTROI HOTFIX
git branch -d hotfix #exclui o branch hotfix

Quando cria o branch em produção, basta dar um GIT PULL que ele baixa para local

#TAG GIT
git tag #exibie todas as tags
git tag <nome_tag> #cria tag
git push –tags origin master #envia tags criadas

git tag -d 0.1 #exclui tag
git push origin :refs/tags/0.1 #commita tag excluida

#referencia direta
git tag -a v1.2 9fceb02 -m “Message here”

 

Referência: https://medium.com/@luizcarvalho/modelo-de-ger%C3%AAncia-de-branchs-de-sucesso-para-git-54955f876c7