-d: This is used to delete the specified branch.-merged: This lists the branches that were merged to the tip of the current branch.The options relevant to this Answer are as follows: The basic syntax of the git branch command is as follows: git branch With this command, we can create, list, or delete branches. The git branch command is used to interact with the branches of Git. Other branches may be the feature branches, which may or may not already be merged. Here, we assume that master, main, and develop are the important branches. With this article at OpenGenus, you must have the complete idea of how to delete the master branch of a Git repository.This answer explains how to delete Git branches that are merged. Delete the master branch using the same commands as in previous section.First, change the default branch in your repository settings in the service using web browser. ![]() Similar to GitHub, other services like GitLab and BitBucket also set master branch as the default branch and hence, if you need to delete it: OR, clone the repository locally, delete the master branch locally and push the changesĭelete master branch in GitLab / BitBucket repository. ![]() Using this, change the default branch to any other branch or select placeholder (if you do not have other branches and you need a dummy branch for now).
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |