Skip to content

Instantly share code, notes, and snippets.

@ThiagoBarradas
Created August 2, 2020 06:42
Show Gist options
  • Save ThiagoBarradas/16ba55275f5a1c554e26c048b2c92b38 to your computer and use it in GitHub Desktop.
Save ThiagoBarradas/16ba55275f5a1c554e26c048b2c92b38 to your computer and use it in GitHub Desktop.
# CRIANDO E CONFIGURANDO PROJETO
git init
git remote add origin git@github.com:ThiagoBarradas/my-project.git
# Faz modificações no projeto e faz commits etc
# Agora, vamos adicionar a primeira tag, fazer o merge para develop e sincronizar com o remote
# Assim teremos a estrutura das branches fixas
git tag 0.0.1
git checkout -b develop
git push origin master
git push origin master --tags
git push origin develop
# INICIANDO GIT FLOW NO PROJETO
git flow init
# No meu caso, não faço 'customizações' e apenas dou <enter> até o fim do setup
# CRIANDO FEATURE
git flow feature start add-something
# Faz modificações no projeto e faz commits etc
# Eventualmente pode pegar atualizações (merge) da develop para ficar atualizado
# FINALIZANDO FEATURE (OU BUGFIX, REQUIREMENT)
# A feature está pronta para entrar para a próxima release?
git flow feature finish add-something --push
# CRIANDO RELEASE
git flow release start 1.0.0
# Se necessário algum 'micro ajuste' faça direto na branch
# Se necessário pegar mais coisas que chegaram deppois na develop, faça o merge da develop para a sua release
# FINALIZANDO RELEASE
git flow release finish 1.0.0 --push
# APARECEU UM BUG CRITICO! PRECISAMOS CRIAR UM HOTFIX!
# CRIANDO HOTFIX
git flow hotfix start 1.0.1
# Ache o bug, corrija e faça os commits
# FINALIZANDO HOTFIX
git flow hotfix finish 1.0.1 --push
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment