How to properly use git and branches

时光怂恿深爱的人放手 提交于 2019-11-29 19:45:09

Am I doing a propery use of git?

Yes the workflow that you describe is pretty much standard workflow. You create some branch, you work on it and when you're done you merge it and remove the not needed branch (unless you are going to continue developing on that branch).

After removing a branch, viewing the history it seems to me that I have lost every information about the branch itself... is that normal?

Yes this is normal.

is it possible to remove a branch but leaving the history information unbroken?

Not sure what you mean here. As long as you have merged the branch before deleting it, the history is still there. You just merged it into another branch and the history can be seen on that branch. There is no way to know when a branch was deleted if that's what you are asking for.

I suggest you read http://nvie.com/posts/a-successful-git-branching-model/ which defines a good pattern for git branching.

I have found that I keep development branches for a period, until time renders the change history you made in those revisions not worth keeping (about 6 months), and then delete them.

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