Git remove local branch8/13/2023 ![]() 'refs/remotes/origin/oxen-translation', but not yet merged to HEAD.Äeleted branch oxen-translation (was daa010c). Warning: deleting branch 'oxen-translation' that has been merged to This command will delete the branch remotely. Now delete the local version of the remote branch: The command is as follows: git push -delete Here I will delete my test branch in my remote repository as shown below.![]() NOTE: If you already had a local copy of the remote branch to delete, start here. We can't have the branch we want to delete checked out when we delete it, so switch back to the master branch: Now we have a local copy of the branch that is linked to the remote branch. Switched to a new branch 'oxen-translation' $ git checkout -b oxen-translation remotes/origin/oxen-translationÄ«ranch oxen-translation set up to track remote branch oxen-translation from origin. In this article, letâs take a look at how to delete local branch in Git. Next, check out the remote branch as a local branch (which will give us the ability to delete it): ![]() It sounds a bit confusing, so we'll walk through it step by step.įor example, suppose we're trying to delete the oxen-translation branch below:įirst, update the list of remote repositories with git fetch, just to make sure you're seeing all of the latest remote repositories:
0 Comments
Leave a Reply.AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |