我有一个包含 3 个分支(main、branch1、branch2)的存储库。
main 是默认分支。
在主要我有一个项目,在分支 1 和 2 中我有一个空的。
我想将 main 中的项目复制到其他 2 个分支。
怎么做?
答案 0 :(得分:0)
git checkout main
git checkout branch1 . #copies the contents of main into working directory
git commit -am "Making branch1 match main"
对 branch2 做同样的事情