How does git replace master with the contents of a folder in the branch and keep the submission record?

The

requirement is like this. I want to deploy the blog to xxx.github.io, but this github only supports placing static pages in master, so I wonder if I can generate static pages in a folder in the src branch and push this folder to master, but git does not allow this.

I executed this code under the src branch git subtree push-- prefix=docs/.vuepress/dist master src
and gave me a hint

fatal: "master" does not appear to be a git repository
fatal: Could not read from remote repository.

so you can"t play like this on master?

Jul.06,2022

git subtree is generally used to deal with different git repository. From your needs, you don't need git subtree, because you are operating different branches of the same repository, and you don't even need src branches. You just need to name the folder of the static page docs, and then set it in the setting of repository:
clipboard.png

.
Menu