![]() ![]() These two commands do the same thing, the only difference is that the second has a shorter syntax. Deleting GIT branches remotely git push -delete We just deleted 6446-task1 branch locally. The uppercase -D argument will forcefully delete local branches, not taking into account whether the contents are pushed or merged. The lowercase -d argument will delete the local branch ONLY IF the content on that branch is pushed and merged with remote branches. Before deleting any branches make sure you moved to another branch that you’re not deleting. The only difference is in the argument (lowercase -d vs. Using any of the above mention commands we can delete branches. So the question is – how to delete GIT branches? Deleting GIT branches locally git branch -d branch_name ![]() (we’ll see that one is a bit more dangerous than the other :P). So, you finished your job, and you just want to get rid of excess branches, both locally and remotely. Such management software can auto-assign task-numbers to tasks, and then branches could end up having similar names ( 6446-task1, 6464-task2, 6466-task3, etc…).Īdditionally, once you’ve finished working on a branch most of the time you don’t need it anymore! Especially if a version control management software is used. Branches can (if the project is somewhat complex) sometimes just pile one onto another, and can make the process of navigating the project and checkouting to different branches harder.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |