How to create a branch with empty content with git


Empty content branches refer to brand new branches, which are not created based on existing branch nodes, and can store brand new initial code. Note that using this will increase the size of the warehouse. If it is not particularly necessary, it is not recommended to do so.

    git commit --allow-empty -m "initial commit"
    git push origin HEAD:refs/heads/[branch name]

from: http://www.yinqisen.cn/blog-107.html

Guess you like

Origin http://10.200.1.11:23101/article/api/json?id=326667610&siteId=291194637