Pergunta

Could someone please tell me if this is okay/safe/sane...

I create a branch from master called BranchA. I then create a branch from BranchA called BranchB. BranchA is merged back into master. If I delete BranchA can I merge BranchB back into master safely or should I keep BranchA around and merge back into it first and then merge BranchA into master?

Foi útil?

Solução

Since Branch B has come off Branch A, it still knows about it. i.e. The history of the commits and state of the master branch when it was created is still there. Once you create Branch B it is independent of Branch A.

For Example, you can rewrite the history of branch A with a rebase, and it will have no affect on Branch B.

Outras dicas

Branches are just pointers to the tip and you can safely delete them. The underlying commits tree still exists and is exactly the same whether you have a pretty associated with some node in it or not; for that reason, merges work exactly as same too regardless of whether some interim branch('s name) was deleted or not.

Licenciado em: CC-BY-SA com atribuição
Não afiliado a StackOverflow
scroll top