How to delete a branch in git
Normally, We will create a branch in GIT, do our commits and push the code to the branch.
Raise a Pull Request. Post to review by the Reviewer, the code will be merged into the master.
In some cases, we may be required be delete a branch created by us. How to delete a branch in GIT ?
Normally, We will create a branch in GIT, do our commits and push the code to the branch.
Raise a Pull Request. Post to review by the Reviewer, the code will be merged into the master.
In some cases, we may be required be delete a branch created by us. How to delete a branch in GIT ?
$ git push origin --delete <branch_name>
$ git branch -d <branch_name>
This will delete the branch and close the Pull Request, if it was raised.
Reference:
https://stackoverflow.com/questions/2003505/how-do-i-delete-a-git-branch-both-locally-and-remotely
No comments:
Post a Comment