简体   繁体   中英

Github Pages: This branch is even with gh-pages

I wanted to host a little web app that I wrote on github.io. So I've created a new orphan branch and called it gh-pages (it's essentially the same as my master branch). I made all the contributions and pushed it on Github. It works perfectly just as I have expected it.

The only thing that's weird is, that when I enter the gh-pages branch on Github it shows me a message that says: This branch is even with gh-pages. Did i made some misconseption here or is it normal and can't be changed?

You can see that branch and the message here: My Github Repository with the error (my site that showed the error, before I fixed it).

I see the gh-pages and master branch have 3 common(initial) commits. 在此处输入图片说明

So, the gh-pages branch is not an orphan branch.

I think, this is the reason why github.com is showing "This branch is even with gh-pages".

Well I've found a ressource finally and it says, that if your project hosted on Github is a website, instead of the master branch, you should simply call your main branch gh-pages. I think this is the most simple and logic way to do it and the message "This branch is even with gh-pages" is gone now, while everything is still working perfectly. Doing it this way helps me to push changes, too, because I can simply commit them to gh-pages instead of thinking about adding a change to both the master and my gh-pages branch.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM