Facebooktwittergoogle_plusredditpinterestlinkedinmail

Delete a git branch

Delete a local branch :

Syntax: git branch -d<branch>
        git branch -d test-branch

If you face any error like “error: The branch ‘test-branch’ is not fully merged” and you are still want to delete this branch then you can forcefully delete. Use ‘git branch -D test-branch’

        git branch -D test-branch

Delete a remote branch:

Syntax: git push origin :<branch>
        git push-origin : test-branch

Delete a local remote-tracking branch:

        git branch -dr <remote>/<branch>
How to Delete a Git branch? Roopendra DevOPSGit,
Delete a git branch Delete a local branch : Syntax: git branch -d<branch> git branch -d test-branch If you face any error like 'error: The branch 'test-branch' is not fully merged' and you are still want to delete this branch then you can forcefully delete....
<h2>Delete a git branch</h2> <strong>Delete a local branch :</strong> <pre>Syntax: git branch -d<branch> git branch -d test-branch</pre> If you face any error like "<em>error: The branch 'test-branch' is not fully merged</em>" and you are still want to delete this branch then you can forcefully delete. Use 'git branch -D test-branch' <pre> git branch -D test-branch</pre> <strong>Delete a remote branch:</strong> <pre>Syntax: git push origin :<branch> git push-origin : test-branch</pre> <strong>Delete a local remote-tracking branch:</strong> <pre> git branch -dr <remote>/<branch></pre>
(Visited 205 times, 10 visits today)
Facebooktwittergoogle_pluslinkedinrss