When should git orphaned branches be used?

前端 未结 2 552
执念已碎
执念已碎 2021-02-06 22:42

Git can host multiple DAGs in the same repo with git checkout --orphan command. A frequently cited use case this feature of git is to keep separate a branch for doc

2条回答
  •  耶瑟儿~
    2021-02-06 23:12

    Another use case by the git online documentation:

    This can be useful when you want to publish the tree from a commit without exposing its full history. You might want to do this to publish an open source branch of a project whose current tree is "clean", but whose full history contains proprietary or otherwise encumbered bits of code.

提交回复
热议问题