Search code examples
gitremote-branch

What happens if I git delete a remote branch that has subbranch that has not been merged to it


I'm getting rid of the development (in purple) branch and having all subbranches branch from master (in teal) and merge to master. development branch is branched from master. If there are sub branches off development that have not been merged yet, will they be able to be merged to master later, after the remote development branch is removed? What is the fate of the leaf (mustard colored) branch.

enter image description here


Solution

  • A branch in git is essentially not much more than a pointer to a commit. When you remove a branch you do not remove the commits, so the "subbranch" (not really an accurate term) will be in tact, and will still be mergeable.