Deleting git branch loses audit

走远了吗. 提交于 2019-12-06 07:36:37

git branches are merely pointers

Yes and which is exactly why deleting them would delete just the pointer.

If you have merged the branch to your mainline, you no longer need that pointer; but you will always know what all commits were made to that branch individually, unless you explicitly choose to not know the specific changes by asking for a fast-forward merge.

The details of exactly which branch you made your commits to are lost once you merge back to another branch. This is detailed in this post and this.

You shouldn't delete branches which are long running and which you wish to keep track of. The act of deleting a branch is a statement of sorts saying that you don't care about that path but from that point on but just about the code.

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!