A way to remember this command is by recalling the git push : syntax that we went over a bit earlier. You may want to dog-ear this page, because you’ll need that command, and you’ll likely forget the syntax. If you want to delete your serverfix branch from the server, you run the following: $ git push origin :serverfixīoom. You can delete a remote branch using the rather obtuse syntax git push. ![]() Suppose you’re done with a remote branch - say, you and your collaborators are finished with a feature and have merged it into your remote’s main branch (or whatever branch your stable code-line is in). Delete Remote Branch įrom Chapter 3 of Pro Git by Scott Chacon: Deleting Remote Branches Therefore, the version of Git you have installed will dictate whether you need to use the easier or harder syntax. Starting with Git v2.8.0, you can also use git push with the -d option as an alias for -delete. Which was added in Git v1.5.0 "to delete a remote branch or a tag." Which might be easier to remember than $ git push : You will receive an error if you try to delete the currently selected branch.Īs of Git v1.7.0, you can delete a remote branch using $ git push -delete. ![]()
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |