How To Delete A Branch On GitHub - Tower Git Client
Có thể bạn quan tâm
The GitHub.com browser interface allows you to delete (and create) remote branches. To do this, you need to navigate to the main page of the repository in your browser and then click the "# branches" link. On the branches overview page, you can then choose a branch to delete:
However, it's very important to understand that you can only delete remote branches, not any of the branches in your local Git repository!
In order to delete a local branch, you need to use Git on your local computer, either via the Command Line or through a desktop GUI.
Deleting a Branch in Git
Using Git on your local computer allows you to delete both local and remote branches. Let's start with deleting a local branch. On the command line, you can type the following:
$ git branch -d <local-branch>To delete a remote branch, you need to use the "git push" command:
$ git push origin --delete <remote-branch-name>The Git Cheat Sheet
No need to remember all those commands and parameters: get our popular "Git Cheat Sheet" - for free!
Download Now for FreeIn case you are using the Tower Git client, you can delete both local and remote branches simply from the contextual menu. Also, if you decide deleting a branch was a mistake, you can undo this with a simple "CMD+Z" keyboard shortcut:
Learn More
- Check out our detailed FAQ article on How to Delete a Local Branch
Related Questions
- Git vs. GitHub: What is the Difference?
- How to delete folders and files on GitHub
- Using GitHub on the Desktop
- How to push to GitHub
- How to delete a repository on GitHub
- How to fork a repository on GitHub
- What is a GitHub Gist?
For additional Git-related questions (and answers!), visit our FAQ homepage.
Từ khóa » Xóa Github
-
Làm Sao Tạo Và Xoá Một Repository Trên GitHub? - Openplanning
-
Deleting Your Personal Account - GitHub Docs
-
Deleting A Repository - GitHub Docs
-
Deleting A Project (classic) - GitHub Docs
-
Deleting An Issue - GitHub Docs
-
Gh Repo Delete - GitHub CLI
-
Deleting Files In A Repository - GitHub Docs
-
Gh Release Delete - GitHub CLI
-
Github Hướng Dẫn Xóa Repository - YouTube
-
How To Delete A GitHub Repository - Rewind Backups
-
[GitHub] How To Delete Folders And Files | Learn Version Control With Git
-
How Do You Delete A GitHub Repository? - GitKraken
-
Is It Safe To Delete A Pull Request? Is It Better To Add A New One?
-
Delete A Branch With An Open Pull Request | GitHub Changelog