1/19/2024 0 Comments Git delete branch just created![]() ![]() Select the trash can icon beside the branch you want delete (on the right side).įor example, in the following image, the branch called old-branch will be deleted. Open a web browser, go to the URL for the project’s GitHub repo, and sign in to GitHub. To delete a branch from your local repo and from GitHub, follow the steps in Delete a branch using VSC. Your local repo might retain a copy of the branch until you pull updates from GitHub into your local repo, or clone the GitHub repo again. Note: Deleting a branch using GitHub removes the branch from GitHub only. Delete a branch using GitHubĬomplete the following steps to delete a branch using GitHub. You’ve deleted a branch using VSC successfully. Replace branch_name with the name of the GitHub branch you want to delete.Ī message in the VSC Terminal confirms that the branch is deleted from GitHub. Replace branch_name with the name of the local branch you want to delete.įor example, in the following image, the GitHub branch old-branch will be deleted from GitHub. ![]() In the VSC Terminal, type the following command to delete the branch from your local repo, and then press Enter.įor example, in the following image, the local branch old-branch will be deleted. Switch to a branch other than the branch you want to delete, and then continue following this guide. You can’t delete the branch that VSC (or Git) is currently switched to. For example, in the previous image, the VSC status bar indicates that VSC is currently switched to the branch called master. Note: The VSC status bar, at the bottom of the editor window, indicates the name of the branch that VSC is currently switched to. ![]() Use the VSC open folder explorer to select the local repository folder (repo) on your computer, and then choose Select folder.įrom the VSC top menu, choose Terminal > New Terminal. Open VSC, and choose File > Open folder from the top menu. Note: To complete this guide you must know how to switch branches, as described in the guide Switch branches. Complete the following steps to delete a branch using VSC. ![]()
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |