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?
Asked
Active
Viewed 59 times
0
-
https://stackoverflow.com/search?q=%5Bgit%5D+delete+branch – phd Feb 20 '21 at 16:39
1 Answers
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