![]() We’ve covered how to delete a remote branch in GitHub. Step 5 – Delete the Remote-Tracking Branch Only use this command when you are sure that you want to delete the branch. You don’t want to delete a branch you need, even if you can restore it later. But be sure to use this feature sparingly. You can use this command any time you want to delete a branch without merging. In the above example, the -D option stands for -delete force. Run the $ git branch -a command to check that the branch has been deleted.Remember to checkout to a branch that you will NOT be deleting.Instead, you can force the deletion to get rid of these useless branches. Fortunately, you don’t have to continue seeing the defunct branches. Usually, this happens when you have branches for a feature that you are no longer working on. Of course, you can always force-delete if you don’t want to push and merge the branches. Otherwise, you won’t be able to delete it. However, these steps only work if you’ve already pushed and merged the local branch with the remote branch. ![]()
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |