Thursday, October 29, 2020

How to Delete Remote Git Branch

Git is a project-tracking application that creates a main project thread that can be branched. Git branches are used to develop changes and updates without affecting the core project. Files in a branch may need to be deleted if they become corrupted or obsolete after merging branches.

Your remote branch is located on a different system; usually, a server like Github, Gitlab, Bitbucket or your personal Git Repository. When you delete a remote branch,it will removed from all users also.

Delete a remote Git branch by entering the following command:

git push remote_project --delete branch_name

There is one alternative, use the following command to delete a remote branch:

git push remote_project :branch_name

In some cases, this may generate an error that indicates that the branch has already been deleted.

0 comments:

Post a Comment