Suppose we have an application that is stable
yesterday, one of the big official bugs Report that we decide on the hotfix immediately, so we create a branch to turn off the "master" hotfix, we call it "2011_Hotfix", and we push it so that all the developers fix it Can collaborate.
We fix the bug, and merge the "Master" in "2011_Hotfix" as well as the current development branch. And press "Master".
Now what do we do with "2011_Hotfix"? Should it be put in the form of a branch only till the end of time or should we remove it, because it has served its purpose? It is inaccurate to leave the list of branches everywhere lying around, because the list of branches will be very long, most of which are still not necessary.
In this incident, it should be removed, what will happen to its history? Will it be maintained, even if the actual branch is no longer available? Besides, how do I remove a remote branch?
You can safely Therefore, it is cheaper to delete a merged branch and you will lose any history. To remove a remote branch, use git branch - arrow branch if it is merged with Changes occur (i.e., you will lose the commit by removing the branch), git will tell you and will not delete it.
git push origin: mybranch , consider your remote name and the remote branch you want to delete is named after Marin . / P>
Comments
Post a Comment