0

I have the master branch and then a branch called feature1 I have a subbranch for feature1 called feature2. I have merged the branches and I'm wondering whether it's a good idea to delete feature2 because when there will be multiple branches I will be confused about all of the branches? Why aren't branches deleted automatically when merging them? How do I delete a branch both locally and from github?

1 Answers1

1

An article explaining how to do it: https://www.freecodecamp.org/news/how-to-delete-a-git-branch-both-locally-and-remotely/

This answer in so also explains it really well: https://stackoverflow.com/a/2003515/10691892

Gist of it:

$ git push -d <remote_name> <branch_name>
$ git branch -d <branch_name>
medzz123
  • 219
  • 2
  • 6