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.
Mikkel Rasmussen. It would not delete the bar_feature branch. From the article: If the branch was merged into another branch before it was deleted then all of the commits will still be reachable from the other branch when the first branch is deleted. They remain exactly as they were.
The -d option will delete the branch only if it has already been pushed and merged with the remote branch. Use -D instead if you want to force the branch to be deleted, even if it hasn't been pushed or merged yet.
Deleting Local Branches First, use the git branch -a command to display all branches (both local and remote). Next, you can delete the local branch, using the git branch -d command, followed by the name of the branch you want to delete.
It is safe to delete your local branch after you pushed your changes to your own remote repository. The pull request is unrelated to this, because it is simply a request to the maintainers of the original repository to merge your changes back into their code base.
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.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With