Programmatically enable Github Pages for a repository
问题 Is there any way to enable Github pages through the api? Not requesting a page build, I mean the initial enabling of the feature and pointing to a branch. 回答1: You just have to push content to the remote git repository. You have to differentiate between a User-Page (username.github.io) and a Project-Page (username.github.io/projectname) User-Page: git clone https://github.com/username/username.github.io cd username.github.io echo "Hello World" > index.html git add --all git commit -m "Initial