Why doesn't GitHub Pages update immediately after you have pushed a binary file in commit? - github

I see when I pushed a text file to github it reflects immediately but when I am pushing a binary file it takes a minute or so to reflect back. I am using GitHub's API to push my changes. Is there any official docs which explains this?
Any help will be appreciated.
I tried searching and found out like GitHub is not very good with very files but didn't find anything which can explain this behaviour.

This probably has nothing to do with text files vs. binary files.
GitHub Pages sites are build using background jobs. Depending on how busy the Pages servers are, how many jobs are ahead of yours, etc. you may see a build happen very quickly, or you may have to wait a while.

Related

"Sorry, this is too big to display."

I uploaded a .ipynb file on github using git lfs but the file is not being displayed. Any ideas on how to fix this?
"Sorry, this is too big to display."
The option "Include Git LFS objects in archives" in the settings is already active. I tried to find something here but couldn't find any topic with this specific problem. I would like to add this to my portfolio repo. Thanks a lot.
The problem is that the file is too large to display in the web view. The file is 36.8 MB in size, and in order to render that Jupiter Notebook, it would have to be downloaded and rendered, which, due to its size, would probably take substantial resources and might simply time out.
As a result, GitHub is telling you that it's not going to render it because it would likely fail due to timeouts and resource constraints necessary to prevent denial of service attacks. If you want to display it elsewhere on your own site, you can render it there yourself, but GitHub won't do it for you.

Deployments dissappear after a couple of hours. Cirlce Ci, Nuxt, Dream Host

I just started working on a project that was created with Nuxt and a CI pipeline using Cirlce CI that detects changes in the repository and upload files via SFTP to DreamHost.
We also have a netlify cms setup that sends .md files to the repository that are read and displayed on the page.
Now to the weird part.
Whenever I change something in the repository (push from my local repo, or use the cms) the changes appear on the site as they should. They correctly trigger a rebuild within circle.ci, which completes successfully and when I look at the live site they are present.
However when checking back a couple hours later they have dissapeared. The changes are still present in the github repository, but they are inconsistent with the state of the live page which has reverted to its previous state.
I can manually trigger rebuilds within circle.ci but the same thing occurs, i can see the changes for some time, then they dissapear.
I don't even know where to start looking for the problemect.
Any leads, or well aimed shots in the dark would be greatly appreciated, many thanks!
Edit.
I think this might be relevant: Every 12 hours we trigger a rebuild on the page, mostly to check for outdated content and deliver freshly rendered pages. When i checked the site index under the _nuxt pages, i see the following:
There are older versions of the scripts that are correct and new versions that are incorrect, those new versions are then referenced, resulting in the content being false.
Why are the automatic rebuilds 'overwriting' the old build?
Where can i find out more about those triggers?
OP's issue was mainly coming from the fact that the app was pulling from the wrong branch.
Fixing that one, did it.

How to completely restore a repository history that uses LFS?

I am very confused about how this all works, so I am gonna make a series of questions.
So I am almost at the end of my final degree project and I have been using Github for version control. At some point, I had to store large files (>100mb) and got this message:
My first question is: what does actually happen if I click "commit anyway"? does it mean that I can't commit anymore?
Anyway, I have done research about lfs and eventually installed it in my repo (btw, this is a Unity project). I have followed this video: https://www.youtube.com/watch?v=09McJ2NL7YM&t=615s. This guy suggests using this custom .gitattribute: https://gist.github.com/nemotoo/b8a1c3a0f1225bb9231979f389fd4f3. This automatically tracks all files with a certain extension and pushes them in lfs. At the time I thought this was cool, until I realised that this file made me push all tracked files no matter how big or small they are. what I should have done is use bash for pushing to lfs only when I would get the message above (so only for files >100mb). Since my whole degree depends on this project, I did not want to mess with GitHub and spend time trying to "fix it", but I want to know if there is any way to restore the whole history and made it as I have never used lfs (?)
Lastly, since I got loads of files stored in lfs, I get that whenever someone re-clones my repo, can just do git lfs fetch --all and then git lfs pull (and this should use up my bandwidth, right?). But.. what happens if someone decides to just "download" the project ("download zip)? Well, I have tried it, and all those files are missing completely.. Is there a way to download the project with the original files instead of pointers?
Also, if you exceed the free 1gb data pack that GitHub provides, and stop paying for additional storage, do you lose all those files??
At some point in the future, I would like to remove lfs, and if I have to, only store files >100mb (I think they are just 2 in total). But would that still mean that to have a complete version of the project the only option would be to clone the repo instead of downloading (?).
Sorry for the long question but I really need to understand these things.

Place for GitHub Snapshot Archives (Source Code)

I am looking for a place which maintain GitHub archives (Source code) periodically.
My requirement is, I need to analyze status of Java/C++/Python GitHub projects over the past years and identify trends of Softwares. For my analysis, I need the exact picture of GitHub for past couple of years. If there is anyplace which checkout GitHub projects periodically and make it available for research purposes, I would like to know a such place.
NOTE:
As far as I know GH Archive maintain, history of GitHub events. But what I need is the exact picture of source codes.
Why I can't go back to the commit history and find the exact picture? I won't be able to consider about deleted project if I consider current picture and try to go back to history.
For analyzing repos hosted on GitHub.com, you may need to contact GitHub support.
They may have these trend reports and share/sell them to you.
Hope this helps!

github - how to go to beginning of commit history OR scroll faster

Is there a way to either scroll faster through the commit history OR go to the very beginning?
I don’t see an option, not even on desktop site.
I’m trying to figure out why a certain branch was made but that info is not in the README section because the README is not customized per branch.
I don't think github has this built in but there are a couple of ways using URLs.
With some trial and error using page? gets you to the beginning of the history fast: https://github.com/micropython/micropython/commits/master?page=242
This is less trial and error because you can enter nearly exact values: you know the current latest commit's hash and github says there's about 8450 commits so this one gets you to the first page: https://github.com/micropython/micropython/commits/master?after=cada971113e6db0cf9e0751e95dbe9217dd707b5+8420
There used to be a tool for it but the site is dead now so only the code is left.
But anyway, I'm fairly sure you'd achieve your actual goal way (examining log searching for something) faster without github, by using git itself. Github is fine for hosting but it's not exactly a complete git user interface. On th other hand git log/blame/rev-list commands are built for that. E.g. first commit hash: git rev-list --max-parents=0 HEAD