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 Branch Github
-
4. Xóa Branch - Backlog
-
Cách Xóa Branch Trên GitHub - AnonyViet
-
[Git] Xóa Branch (nhánh) Local Và Remote (server)
-
Cách Xóa Một Nhánh Trong Git Cục Bộ Và Từ Xa
-
Creating And Deleting Branches Within Your Repository - GitHub Docs
-
Deleting And Restoring Branches In A Pull Request - GitHub Docs
-
Git - Xóa Local Branch - Freetuts
-
How To Delete A Branch In GitHub - Nira
-
How Do I Delete A Git Branch Locally And Remotely? - Stack Overflow
-
How To Delete A Branch On GitHub - How-To Geek
-
How To Delete A Git Branch Both Locally And Remotely
-
Git Delete Branch – How To Remove A Local Or Remote Branch
-
Delete A Branch With An Open Pull Request | GitHub Changelog
-
Một Số Trường Hợp Khi Sử Dụng Git - Viblo