需求是这样的,我想把博客部署到xxx.github.io 但是这个github只支持在master中放置静态页面,所以就想能不能在src分支中的一个文件夹下生成静态页面,并把这个文件夹推送到master,但是git不允许这样做,
我在src分支下执行了这段代码git subtree push --prefix=docs/.vuepress/dist master src
然后给我提示
fatal: 'master' does not appear to be a git repository
fatal: Could not read from remote repository.
所以不能在master上这么玩???
git subtree 一般用来处理不同的 git repository,从你的需求来看,你并不需要 git subtree,因为你完全就是操作同一个 repository 的不同的分支,甚至你都不需要 src 分支,你只需要将静态页面的文件夹命名为 docs,然后在 repository 的 setting 中设置:
