Can I make the gh-pages branch of my git repository a mirror of the Master branch?

守給你的承諾、 提交于 2019-12-06 05:21:55

I ran through a bunch of my own tests. It doesn't seem like you need to go through the exact process they've laid out at http://pages.github.com/ in order to create the gh-pages branch. You can simply create a new branch named gh-pages from within the GitHub Mac App.

They probably don't instruct people to do this because what I'm accomplishing here isn't a typical scenario.

You can take these steps to create the 'gh-pages' branch from within the GitHub Mac App:

  1. Go to the Branches view of your repository
  2. Click the + button on your Master branch to create a new branch - name this 'gh-pages'
  3. Click the Publish button to push it to GitHub
  4. Use the bottom left menu to checkout the Master branch, if you're not working in the Master branch

Take these steps to sync your changes from the Master branch into the gh-pages branch:

  1. Make changes in your Master branch
  2. In the Changes view, enter the commit summary & click the Commit & Sync button to push to the Master branch
  3. Switch to Branches view
  4. Click the Merge View button to display the Merge view
  5. Drag the Master branch to the left slot & the gh-pages branch to the right slot
  6. Click the Merge Branches button
  7. Use the bottom left menu to checkout the gh-pages branch
  8. Click the Branch in Sync button to force a synchronization
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!