How to Delete a branch in remote GitHub repository
In this post we will give you information about How to Delete a branch in remote GitHub repository. Hear we will give you detail about How to Delete a branch in remote GitHub repositoryAnd how to use it also give you demo for it if it is necessary.
we are going to learn about how to delete a branch in remote GitHub repository.
Consider, that we have a git branch called work in remote GitHub repository.To delete that branch follow the below tutorial.
To delete a branch in remote GitHub repository, we can use the git push command followed by the remote-name , –delete flag and branch name.
Here is an example:
# git push <remote-name> --delete <branch-name>git push origin --delete work
Now, our work branch is successfully deleted remotely.
Note: In most cases, remote-name is origin.
Deleting Git branch Locally
To delete a git branch locally, we can use the git branch command followed by the -d flag and name of the branch.
Example:
# git branch -d <branch-name>git branch -d work
Hope this code and post will helped you for implement How to Delete a branch in remote GitHub repository. if you need any help or any feedback give it in comment section or you have good idea about this post you can give it comment section. Your comment will help us for help you more and improve us. we will give you this type of more interesting post in featured also so, For more interesting post and code Keep reading our blogs