push local master *into* gh-pages branch on github

前端 未结 4 751
陌清茗
陌清茗 2021-02-01 05:45

I created a simple gh-pages branch on github and in my local repo. I used the auto page generator to create the 5 files it uses: images javascripts stylesheets index.h

4条回答
  •  攒了一身酷
    2021-02-01 06:40

    If I understand you correctly it seems that you created the dummy Readme and the other files on your local master branch but intended to have them on the gh-pages branch. If thats the case, the safest option is to merge your master branch into the gh-pages branch (assuming you dont have other files on master you would rather not have on the gh-pages branch). The command suggested git push -f origin master:gh-pages will push your local master branch to the gh-pages branch. I'm not really sure what you mean but into vs onto, as branch names are just pointers in git.

提交回复
热议问题