How do I get my site to show up through github? - github

I uploaded my files to github, checked off readme, commit changes, selected masterbranch, and I got the following message as I scrolled down the page: Your site is published at https://tanishav842.github.io/Recipes/ but there is nothing there except for the word Recipes, which appears at the end of the site address that had been established for me through github. What did I do wrong?

Well, Tani, to have your own page hosted by GitHub Pages it need to be stored in one of the following places
In a public repository named <your-github-username>.github.io
Under a docs folder in master branch of any public repository you own
In gh-pages branch of any public repository you own
It means your Recipes repository are pretty much there.
Just copy your master branch content to a new branch named gh-pages and push it:
git checkout -b gh-pages
git push -u origin gh-pages
In addiction, as commented Edric, it would be cool to have your pretty nice stuff added to your page.
By now, I suppose GitHub is using your README.md that just have the word Recipes there!
Anyways, Here you can find a bunch of details about Working with GitHub Pages and also some step-by-step tutorials to learn how to do it properly
Hope this can help you!

Hosting a site is better supported by the GitHub application. Try following these steps to see if they help:
Download either GitHub for Mac or GitHub for Windows, depending on your operating system. Open the app and log in using the account you just created.
(On Mac): After you login, click advanced and make sure that your name and email are correct. Then, click "Install Command Line Tools", just in case you want to start using the command line later in life.
Create a new repository in your GitHub application. Name it your-username.github.io. The name is very important. Note the folder that GitHub is saving the repository to. Make sure the "Push to GitHub?" box is checked.
Move your website's files into the folder that GitHub just created when you made the repository. IMPORTANT: Your homepage HTML file must be called "index.html", and it must exist in the top-level directory.
Back in the GitHub application, you should see your files in the left column. Make sure they are all checked. If so, enter a message in the text box called "commit summary", something like "initial commit." Then, click the commit button.
Click the "Publish repo" button in the top right corner.
Give it about 10 minutes, then check your-username.github.io. Your website should be there!
Here's the reference link:
https://gist.github.com/TylerFisher/6127328

Related

How to create a new file in github and add there existing files?

I have files in repository. I want them to be grouped inside a folder. How can I do this?
It seems that I need to add new file if I want to create a folder.
From how you worded your question, it seems like you're trying to work on github directly from the website.
The usual way github works is:
if you have a repo on github and you want to modify it, first 'clone' the repo into your local computer,
use these instructions https://docs.github.com/en/repositories/creating-and-managing-repositories/cloning-a-repository
then just change folder structure like you would normally on File Explorer (windows) or Finder (mac),
then follow the commit instructions and 'push' up your changes to github
use these instructions
check status of your recent changes:
git status
add the files that you want to include in the commit
git add nameOfFile
check status and the file you want to include should now be green
git status
use this to send to github
git push
Overall github docs here:
https://learn.microsoft.com/en-us/training/modules/introduction-to-github/

Very simple HTML resulting in 404 Not Found on GitHub Pages [duplicate]

Here is my GitHub repository on the gh-pages branch.
Everything looks good, I have my index.html, my CSS, JS and pictures folders.
But when I access http://roine.github.com/p1 I get HTTP 404 not found.
Any explanation and solution?
I had just one commit with all my files. I pushed an empty commit, refreshed the page and it worked.
git commit --allow-empty -m "Trigger rebuild"
git push
If this doesn't work, as #Hendrikto pointed out in the comments, check out the Github status page and make sure GitHub Pages are operational.
I did all the tricks on my repo to fix page 404 on Github Page (https://eq19.github.io/) but it kept 404'ing.
Finaly found that my browser hardly keep the 10 minutes cache before it up on the web.
Just add /index.html into the end of URL then it showed up and solved the case.
https://username.github.io/{repoName}/index.html
In my case, I had folders whose names started with _ (like _css and _js), which GH Pages ignores as per Jekyll processing rules. If you don't use Jekyll, the workaround is to place a file named .nojekyll in the root directory. Otherwise, you can remove the underscores from these folders
Four months ago I have contacted the support and they told me it was a problem on their side, they have temporarily fix it (for the current commit).
Today I tried again
I deleted the gh-pages branch on github
git push origin --delete gh-pages
I deleted the gh-pages branch on local
git branch -D gh-pages
I reinitialized git
git init
I recreated the branch on local
git branch gh-pages
I pushed the gh-pages branch to github
git push origin gh-pages
Works fine, I can finally update my files on the page.
If you haven't already, choose a Jekyll theme in your GitHub Pages settings tab. Apparently this is required even if you're not using Jekyll for your Pages site.
I had the same issue after forking a repo with a gh-pages branch. I was able to fix by simply pushing a new commit (just whitespace in index.html) to my fork's gh-pages branch.
In my case on 8/Aug/2017
if your user page is https://github.com/mgravell, you repo name must be
mgravell.github.io
under root, create a file index.html
under root, create a folder docs, create a file
CNAME under docs (note: NO extension like .txt, make sure your file
system shows extension)
gh-pages branch is optional, master branch is sufficient
more: check official docs here: https://help.github.com/articles/configuring-a-publishing-source-for-github-pages/
Just wait about ten minutes to one hour. If it still doesn't work, contact github. Usually it's the problem at their end.
But, if you're in a hurry, you can try to open by adding "?" question mark at the end of URL. It force query to search for the resource. Like this:
http://roine.github.com/p1?
In my case the browser had a previous cached version of my app. To avoid getting the cached version, access you url using a random query string:
https://{{your-username}}.github.io/{{your-repository}}?randomquery
My pages also kept 404'ing. Contacted support, and they pointed out that the url is case sensitive; solved my issue.
in my case i had to go to project settings and enable the github pages. The default is off
If you saw 404 even everything looks right, try switching https/http.
The original question has the url wrong, usually you can check repo settings and found the correct url for generated site.
However I have everything set up correctly, and the setting page said it's published, then I still saw 404.
Thanks for the comment of #Rohit Suthar (though that comment was to use https), I changed the url to http and it worked, then https worked too.
Add the following in the beginning of the index.html file
<!DOCTYPE html>
In my case in react was necessary to select the gh-pages branch:
I was facing the same issue, after trying most of the methods mentioned above I couldn't get the solution. In my case the issue of because of Github changing the name of master to main branch.
Go to Setting -> go to GitHub Pages section and change the branch to main:
to
Save it and select a theme, and the website is live.
If you are sure that your structure is correct, just push an empty commit or update the index.html file with some space, it works!
I had this exact problem with typedocs. The README.md worked but none of the actual docs generated by my doc strings displayed, I just got a 404 Github Pages screen.
To fix this, just place a empty file in your /docs directory (or wherever you generate your docs) & call it .nojekyll
To confirm, your file structure should now look like:
./docs/.nojekyll # plus all your generated docs
Push this up to your remote Github repo and your links etc should work now.
Also make sure you have selected in your Github settings:
Settings -> Github Pages -> Source -> master brach /docs folder
Depending on your doc framework, you probably have to recreate this file each time you update your docs, this is an example of using typedocs & creating the .nojekyll file each time in a package.json file:
# package.json
"scripts": {
"typedoc": "typedoc --out docs src && touch docs/.nojekyll"
},
The solution for me was to set right the homepage in package.json.
My project name is monsters-rolodex and I am publishing from console gh-pages -d build.
"homepage": "https://github.com/monsters-rolodex",
The project was built assuming it is hosted at /monsters-rolodex/.
Before it didn't work because in the homepage url I included my github username.
I got the site to work by deleting the "username.github.io" folder on my computer going through the steps again, including changing the index/html file.
My mistake (I think) is that i initially cloned "https://github.com/username/username.github.io.git" instead of https://github.com/username/username.github.io (no ".git")
In my case, all the suggestions above were correct. I had most pages working except few that were returning 404 even though the markdown files are there and they seemed correct. Here is what fixed it for me on these pages:
On one page, there were a few special characters that are not part of UTF-8 and I think that's why GitHub pages was not able to render them. Updating/removing these char and pushing a new commit fixed it.
On another page, I found that there were apostrophes ' surrounding the title, I removed them and the page content started showing fine
Another variant of this error:
I set up my first Github page after a tutorial but gave the file readme.md a - from my perspective - more meaningful name: welcome.md.
That was a fatal mistake:
We’ll use your README file as the site’s index if you don’t have an
index.md (or index.html), not dissimilar from when you browse to a
repository on GitHub.
from Publishing with GitHub Pages, now as easy as 1, 2, 3
I was then able to access my website page using the published at link specified under Repository / Settings / GitHub Pages followed by welcome.html or shorter welcome.
For some reason, the deployment of the GitHub pages stopped working today (2020-may-05). Previously I did not have any html, only md files. I tried to create an index.html and it published the page immediately. After removal of index.html, the publication keeps working.
I was following this YT video. So, when I ran the command in my terminal, it pushed the code to gh-pages branch already. Then I pushed to the master branch. It was giving me 404 error.
Then I swapped the branch to master and then again reverted to gh-pages and now the error is gone. It's pointing to the index.html even if it's not in the URL.
I bound my domain before this problem appeared. I committed and pushed the branch gh-pages and it solved my problem. New commits force jekyll to rebuild your pages.
In my case, the URL was quite long. So, I guess there is a limit. I put it to my custom subdomain and it worked.
On a private repo, when I first added and pushed my gh-pages branch to github, the settings for github pages automatically changed to indicate that the gh-pages branch would be published, but there no green or blue bar with the github.io url and no custom domain options.
It wasn't until I switched the source to master and quickly switched the source back to gh-pages that it actually updated with the green bar that contains the published url.
Your GitHub Pages is available at http://roine.github.io/p1 instead of http://roine.github.com/p1.
By the way, you can fix your project's description.
In my case it was that I had recently set up a custom domain for GitHub pages, but GitHub had forgotten my custom domain under (repo)<name>.github.io / Settings / Pages.
I added the custom domain again and then it immediately started working.
Go to settings section of your repository and choose master branch at the Source section and click save button after that refresh the page and you will be able to see the link of your page!.
I faced this problem (404) too and the root cause was my file was named INDEX.md. I was developing on Windows and my local Jekyll site worked (since Windows treats file names case insensitive by default). When pushed to Github, it didn't work. Once I renamed the INDEX.md to index.md, things worked well.

New to git--just need to sync one file

I managed to finally get EGit in Eclipse to work (still don't know how) and I've committed/pushed my current project up to GitHub. So far, so good. Looking at it on GitHub's site, I see it wants me to make a README.md file to provide a nice description. Fine, I think, I'll just use the tool it's providing me with to get it started, then have it sync back down to my local computer where I can further modify it and keep it synced.
So I created a quick README.md file on GitHub's site. But now, when I perform a "Pull" action in Eclipse, I am told that there's nothing new to pull, or something like that. Why is it not getting the new file that was created on GitHub's site, and how can I get it so that I can make changes to it whenever I want?
If you have git installed you can use a terminal and type in the root of your repository:
git pull origin master
or you could try checking out only that file:
git checkout README.md

Why does my GitHub page not update its content?

I've been following the official guide # pages.github.com
So far I've created the local repo and pushed it to GitHub, but, whatever change I do, I can see it in my repo at GitHub but not in my GitHub page. How is that possible?
A bit late to the party but I just had this issue and my solution isn't covered by any of the above.
Specifically my issue was the following:
I had created a github.pages site with a custom domain.
I was pushing commits to the correct GitHub branch but not seeing the updates on the github.pages site.
Solution:
The issue turned out to be my browser caching the page (despite my having page caching disabled). To fix it I just cleared my cached data from the past hour and that worked instantly.
To clear the cache data in Chrome go to the Chrome menu then More Tools > Clear Browsing Data.
I don't know what caused the caching, this github.pages/custom domain combo is the only thing that has ever caused it for me.
Sometimes this happens to me too: after creating and pushing the gh-pages, the GitHub Pages page is missing or not getting updated. Even if I commit more changes to the branch and push it again, it won't update on GitHub pages.
If I remember correctly, I solve this by deleting the branch from the server and pushing it again:
git push origin :gh-pages
git push origin gh-pages
I might have to add some dummy commits and push again to trigger the update, I don't remember exactly...
I had the same issue.
The problem was that my website was publishing from the gh-pages branch, but I was pushing my recent changes to the master branch.
Check which branch Github is publishing your website from. In your repository, click on Settings, scroll down the page and there should be a box where you you can change the publishing branch.
It should look like this:
More info is here
Also if you are using a custom domain name, make sure your CNAME file is up to date.
Hope that helps!
I fixed this problem.
you can try to go to the setting page.
I go into the project settings page (.../settings/pages) ,and found Github pages give me some message "some syntax error", I fixed it, and ok.
Try to push empty commit like this
$ git commit --allow-empty -m "Empty commit"
Works like a charm for me every time.
To solve this issue
Switch your current Github Pages branch to some other branch and click
on Save
Switch back to your desirable Github Pages branch and click on Save.
This will force Github to update your changes.
I am a novice and please allow me to answer with tears. Please go to settings at your repository, scroll down to to check WHETHER THERE IS A PROBLEM with your current webpage. If there is a problem, your site WILL NOT BE UPDATED. I think it's a protection mechanism or something.
This morning I deleted and moved some of the files in repository, I have updated many times and it still remains on previous version, even I checked the index.html has indeed updated. Later I shut down the whole repository and started new one, inserting items one by one, but still met the problem. I tried new branch like gh-pages, I think it is not necessary for a beginner like me. Later I checked my settings and found the notification, I deleted the problematic files and it worked instantly. Were I knew the problem I would not have been so stupid to shut down it forever. I miss my old git records. Guess every lesson takes a price, Github is no exception.
Experienced this problem when a filename contained the word "vendor" ex.:vendor.bundle.20d44fcf5147c6ed68a3.js
Adding an empty file named .nojekyll in the root of the repository fixed the issue.
Jekyll now ignores the vendor and node_modules directories by default
https://github.com/blog/2277-what-s-new-in-github-pages-with-jekyll-3-3
Try to disable GitHub pages, and enable it after a few minutes. I tried. This works. But It takes some time to update and re-enable GitHub Pages.
Press ctrl+F5 to re-download cached content.
I tried Janos' answer but it didn't work for me.
I made a slight change to my index.html file (something insignificant) and pushed to the gh-pages branch again. I tried opening the page in a different browser and it worked. My original browser updated the page too although I don't think it's a browser cache issue.
I rebased master with gh-pages locally and pushed that as well, not sure if that makes any difference.
This answer is for those who have created their app with create-react-app.
It took me days to finally find the answer for react-gh-pages not updating. I hope the following answer helps as it did for me. It is a combination of multiple answers that I have researched over:
The main and most common reason is your browsers caching feature. In order to disable it for every rendering of your index.html,
Add this snippet in your index.html file under the public folder.
<meta http-equiv='cache-control' content='no-cache'>
<meta http-equiv='expires' content='0'>
<meta http-equiv='pragma' content='no-cache'>
Push any new changes to the master or main branch(not to the origin gh-pages).
By now your master branch is updated.
Now run: git push origin :gh-pages. This will delete the gh-pages branch.
Run: npm run deploy. This will re-build your app and re-create gh-pages branch
with updated content.
Now go the settings section on the top-right side of your app repo page. Scroll down to the bottom. Under Github Pages section, under source, there is branch section. Change that to your master branch or main. Keep the root folder as it is.
Go to your site and you will see a Readme file. It may take some time. After a minute or so change the branch back to gh-pages. After a minute visit your site and it should be updated by now.
I hope this helps! Let me know if it worked for you as well in the comment section, cheers!
I recently had an issue where my github pages hosted site wasn't updating from an old branch push in master. I was able to see the new changes by going to domain.com. (the dot at the end is important), and also hard refreshing would show the new changes, but with a regular refresh, it would show the old site and the old JS files too.
My problem seemed to only be in Chrome, which is where I was developing the site. For full disclosure, the old changes were in React and hosted in Netlify. The new changes that I was trying to get to push and display were static files hosted in github pages.
THE FIX (in Chrome): devtools > Application > clear site data (button).
Here is what worked for me:
First Step (update your master):
git add .
git status # to see the changes to be committed
git commit -m "comments"
git push origin master
Second Step (Update gh-pages):
git-checkout gh-pages # going to the gh-pages branch
git rebase master # sync gh-pages with master
git push origin gh-pages # commit changes to gh-pages
git checkout master # return to the master
I had the same problem everything is up to date in my repository but it still wasn't loading to my github page, so without making any further changes, I tried to add, commit and pull.
I fixed it with another git commit, and git pull again.
Now the changes are loaded to my git.
The easiest way:
Settings -> Braches -> choose "gh-pages" -> UPDATE.
Take mine as example
In my case, it helped to run:
npm run deploy
I did it after pushing the master branch to GitHub. I needed to wait a bit until the changes were visible on my page. But it did work without changing any settings.
In case this helps someone else...
For me the issue was the content in the branch was being updated, but the filenames did not change, so browser was retrieving cached content.
I'm using Angular CLI with angular-cli-ghpages. Setting the configuration to production appends hashes after each file in the build forcing the browser to retrieve the new content.
sample deploy script:
ng build --configuration=production --base-href \"<repo-name>\" && ngh
If you don't want a production build, you can also specify output hashing in other build configurations in angular.json
If you're using the gh-pages command you may need to delete the gh-pages cache at node_modules/gh-pages/.cache
The issue is being caused because of the browser caching the page. Open the git link in incognito mode.
If your GitHub pages repo is private AND you have recently downgraded to GitHub Free, this might apply:
Your subscription, GitHub Free, does not support GitHub Pages sites
for private repositories. After we introduced free private
repositories in January, we found a limited number of sites connected
to private repositories were mistakenly left active. If you’d like to
keep updating this site, you can make its repository public or upgrade
to GitHub Pro. You can also unpublish it below. This site is using a
custom CNAME: Secure your domain name before unpublishing this site.
I reflect my changes in my deployed GitHub repository after committing locally, by renaming my gh-pages branch to master and unpublishing my GitHub Page, and then re-name the branch to gh-pages and then publish it again; then it works.
In my case it related to an issue in my config file. This showed up on Settings -> Pages.
If your page was online, but after update no changes visible:
1: Change repository to private
2: Change back to public
3: Enable "GitHub Page" function again
A couple have mentioned looking for error messages in Settings->Pages, but a better place to look is the stdout of the jekyll build workflow under the About tab. In either case, an error message of any sort is best to have in hand before starting on any of the other 26 answers given above.
For those who find solutions above not useful try this:
delete "build" directory on your local machine
run "npm run deploy"
Deleting directory helped me, it will reflect changes on github pages branch, then wait a minute, if you still dont see any changes, try clearing cache or visit your page in incognito
Worked for me.
After making changes in your script, go down to the commit changes section. There you'll find one input box and one text-area. As you all know filling those boxes is not mandatory, but they are there for a reason. So, next time before clicking on the commit changes button give this a try >> make sure that you write something in the first input box (you can leave the text-area empty), and what you write is different from what you wrote for your last commit for the same file. In this way github will be able to distinguish between the current script and the updated one, and the change should be reflected almost instantly.
Hope that helps.
The problem is caused due to browser caching the page.
Disable browser caching with meta HTML tags. Add the following in _layouts/default.html
<meta http-equiv="Cache-Control" content="no-cache, no-store, must-revalidate" />
<meta http-equiv="Pragma" content="no-cache" />
<meta http-equiv="Expires" content="0" />
WARNING: After this any browser supporting Cache-Control will not store any of your cookies or files.
Just clear browser's cache.
ctrl + shift + r for Chrome, as example
Nothing to worry, to Update your git react code rebuild code by using command
npm run deploy
react code will updated to gh-pages

How to fix HTTP 404 on Github Pages?

Here is my GitHub repository on the gh-pages branch.
Everything looks good, I have my index.html, my CSS, JS and pictures folders.
But when I access http://roine.github.com/p1 I get HTTP 404 not found.
Any explanation and solution?
I had just one commit with all my files. I pushed an empty commit, refreshed the page and it worked.
git commit --allow-empty -m "Trigger rebuild"
git push
If this doesn't work, as #Hendrikto pointed out in the comments, check out the Github status page and make sure GitHub Pages are operational.
I did all the tricks on my repo to fix page 404 on Github Page (https://eq19.github.io/) but it kept 404'ing.
Finaly found that my browser hardly keep the 10 minutes cache before it up on the web.
Just add /index.html into the end of URL then it showed up and solved the case.
https://username.github.io/{repoName}/index.html
In my case, I had folders whose names started with _ (like _css and _js), which GH Pages ignores as per Jekyll processing rules. If you don't use Jekyll, the workaround is to place a file named .nojekyll in the root directory. Otherwise, you can remove the underscores from these folders
Four months ago I have contacted the support and they told me it was a problem on their side, they have temporarily fix it (for the current commit).
Today I tried again
I deleted the gh-pages branch on github
git push origin --delete gh-pages
I deleted the gh-pages branch on local
git branch -D gh-pages
I reinitialized git
git init
I recreated the branch on local
git branch gh-pages
I pushed the gh-pages branch to github
git push origin gh-pages
Works fine, I can finally update my files on the page.
If you haven't already, choose a Jekyll theme in your GitHub Pages settings tab. Apparently this is required even if you're not using Jekyll for your Pages site.
I had the same issue after forking a repo with a gh-pages branch. I was able to fix by simply pushing a new commit (just whitespace in index.html) to my fork's gh-pages branch.
In my case on 8/Aug/2017
if your user page is https://github.com/mgravell, you repo name must be
mgravell.github.io
under root, create a file index.html
under root, create a folder docs, create a file
CNAME under docs (note: NO extension like .txt, make sure your file
system shows extension)
gh-pages branch is optional, master branch is sufficient
more: check official docs here: https://help.github.com/articles/configuring-a-publishing-source-for-github-pages/
Just wait about ten minutes to one hour. If it still doesn't work, contact github. Usually it's the problem at their end.
But, if you're in a hurry, you can try to open by adding "?" question mark at the end of URL. It force query to search for the resource. Like this:
http://roine.github.com/p1?
In my case the browser had a previous cached version of my app. To avoid getting the cached version, access you url using a random query string:
https://{{your-username}}.github.io/{{your-repository}}?randomquery
My pages also kept 404'ing. Contacted support, and they pointed out that the url is case sensitive; solved my issue.
in my case i had to go to project settings and enable the github pages. The default is off
If you saw 404 even everything looks right, try switching https/http.
The original question has the url wrong, usually you can check repo settings and found the correct url for generated site.
However I have everything set up correctly, and the setting page said it's published, then I still saw 404.
Thanks for the comment of #Rohit Suthar (though that comment was to use https), I changed the url to http and it worked, then https worked too.
Add the following in the beginning of the index.html file
<!DOCTYPE html>
In my case in react was necessary to select the gh-pages branch:
I was facing the same issue, after trying most of the methods mentioned above I couldn't get the solution. In my case the issue of because of Github changing the name of master to main branch.
Go to Setting -> go to GitHub Pages section and change the branch to main:
to
Save it and select a theme, and the website is live.
If you are sure that your structure is correct, just push an empty commit or update the index.html file with some space, it works!
I had this exact problem with typedocs. The README.md worked but none of the actual docs generated by my doc strings displayed, I just got a 404 Github Pages screen.
To fix this, just place a empty file in your /docs directory (or wherever you generate your docs) & call it .nojekyll
To confirm, your file structure should now look like:
./docs/.nojekyll # plus all your generated docs
Push this up to your remote Github repo and your links etc should work now.
Also make sure you have selected in your Github settings:
Settings -> Github Pages -> Source -> master brach /docs folder
Depending on your doc framework, you probably have to recreate this file each time you update your docs, this is an example of using typedocs & creating the .nojekyll file each time in a package.json file:
# package.json
"scripts": {
"typedoc": "typedoc --out docs src && touch docs/.nojekyll"
},
The solution for me was to set right the homepage in package.json.
My project name is monsters-rolodex and I am publishing from console gh-pages -d build.
"homepage": "https://github.com/monsters-rolodex",
The project was built assuming it is hosted at /monsters-rolodex/.
Before it didn't work because in the homepage url I included my github username.
I got the site to work by deleting the "username.github.io" folder on my computer going through the steps again, including changing the index/html file.
My mistake (I think) is that i initially cloned "https://github.com/username/username.github.io.git" instead of https://github.com/username/username.github.io (no ".git")
In my case, all the suggestions above were correct. I had most pages working except few that were returning 404 even though the markdown files are there and they seemed correct. Here is what fixed it for me on these pages:
On one page, there were a few special characters that are not part of UTF-8 and I think that's why GitHub pages was not able to render them. Updating/removing these char and pushing a new commit fixed it.
On another page, I found that there were apostrophes ' surrounding the title, I removed them and the page content started showing fine
Another variant of this error:
I set up my first Github page after a tutorial but gave the file readme.md a - from my perspective - more meaningful name: welcome.md.
That was a fatal mistake:
We’ll use your README file as the site’s index if you don’t have an
index.md (or index.html), not dissimilar from when you browse to a
repository on GitHub.
from Publishing with GitHub Pages, now as easy as 1, 2, 3
I was then able to access my website page using the published at link specified under Repository / Settings / GitHub Pages followed by welcome.html or shorter welcome.
For some reason, the deployment of the GitHub pages stopped working today (2020-may-05). Previously I did not have any html, only md files. I tried to create an index.html and it published the page immediately. After removal of index.html, the publication keeps working.
I was following this YT video. So, when I ran the command in my terminal, it pushed the code to gh-pages branch already. Then I pushed to the master branch. It was giving me 404 error.
Then I swapped the branch to master and then again reverted to gh-pages and now the error is gone. It's pointing to the index.html even if it's not in the URL.
I bound my domain before this problem appeared. I committed and pushed the branch gh-pages and it solved my problem. New commits force jekyll to rebuild your pages.
In my case, the URL was quite long. So, I guess there is a limit. I put it to my custom subdomain and it worked.
On a private repo, when I first added and pushed my gh-pages branch to github, the settings for github pages automatically changed to indicate that the gh-pages branch would be published, but there no green or blue bar with the github.io url and no custom domain options.
It wasn't until I switched the source to master and quickly switched the source back to gh-pages that it actually updated with the green bar that contains the published url.
Your GitHub Pages is available at http://roine.github.io/p1 instead of http://roine.github.com/p1.
By the way, you can fix your project's description.
In my case it was that I had recently set up a custom domain for GitHub pages, but GitHub had forgotten my custom domain under (repo)<name>.github.io / Settings / Pages.
I added the custom domain again and then it immediately started working.
Go to settings section of your repository and choose master branch at the Source section and click save button after that refresh the page and you will be able to see the link of your page!.
I faced this problem (404) too and the root cause was my file was named INDEX.md. I was developing on Windows and my local Jekyll site worked (since Windows treats file names case insensitive by default). When pushed to Github, it didn't work. Once I renamed the INDEX.md to index.md, things worked well.