Official Synopsis
$ git push origin --delete <branch_name>
$ git branch -d <branch_name>
If there are unmerged changes which you are confident of deleting:
$ git branch -D <branch_name>
Delete Local Branch
To delete the local branch use:
$ git branch -d branch_name
Note: The - d alternative is a moniker for - erase, which just erases the branch in the event that it has just been completely converged in its upstream branch. You could likewise utilize - D, which is a false name for - erase - drive, which erases the branch "regardless of its blended status."
[Source: man git-branch]
Delete Remote Branch
As of Git v1.7.0, you can delete a remote branch using
$ git push origin --delete <branch_name>
which might be easier to remember than
$ git push origin :<branch_name>
which was added in Git v1.5.0 "to delete a remote branch
or a tag."
In this way, the form of Git you have introduced will manage whether you have to utilize the less demanding or harder sentence structure.
Other links you may like
HTTP Error 403, 404, 500, 503, and
504 | Create Database in SQL Server 2014
| Create Multiple Instance in SQL
Server 2012 | Create Table in SQL Server 2014
| DNS on Windows Server 2012
| Failover Cluster - Windows Server
2012
Very great post. I simply stumbled upon your blog and wanted to say that I have really enjoyed browsing your weblog posts. After all I’ll be subscribing on your feed and I am hoping you write again very soon!
ReplyDelete