home | list info | list archive | date index | thread index

Re: [OCLUG-Tech] more trivial git questions: when will git refuse to delete a branch?

  • Subject: Re: [OCLUG-Tech] more trivial git questions: when will git refuse to delete a branch?
  • From: Dmitriy Korovkin <dnkorovkin [ at ] gmail [ dot ] com>
  • Date: Thu, 18 Jun 2015 21:43:16 -0400
On Thu, 18 Jun 2015 03:45:31 -0400 (EDT)
"Robert P. J. Day" <rpjday [ at ] crashcourse [ dot ] ca> wrote:

> 
>   still poring over the minutiae of git, and want to make sure i
> understand the circumstances under which git will refuse to delete a
> branch, or will at least generate a warning.
> 
>   first, git will typically refuse to delete a branch if it's not
> "fully merged", but if i understand this correctly, the only checking
> for being "fully merged" is two conditions:
> 
> * compare against current branch HEAD, or
> * compare against upstream branch
>From what I see, git refuses deleting branch if it was not pushed. I am not sure how will git act in more exotic situations, such as: you create a branch(1), make a commit, make another branch out of it (1 -> 2), make another commit, and then push that branch(2). Then you try to delete the first one (1).
 
/Dmitriy