So, yesterday I wanted to upload a MSI file (for my Electron video game) on GitHub, but the file was over 100MB, so I used Git LFS to upload it.
Then, I downloaded the MSI file from GitHub to see if it works. It should've shown this:
But, instead I get this:
This is my .gitattributes file:
*.exe filter=lfs diff=lfs merge=lfs -text
*.msi filter=lfs diff=lfs merge=lfs -text
This is my repo: #EntityPlantt/parakeet-simulator
What do I do?
Edit
It turns out that the file looked something like this:
version https://git-lfs.github.com/spec/v1
oid sha256:50937b5a534292b38a0329c305d12b2da99b86281fd8841ac07f8bf0f38359fb
size 177451008
It wasn't even binary!
When I download it thru GitHub Pages with this link, the above thing shows up, and when I download it thru GitHub's Raw option, via this link, it works. But, why?
When using Git LFS, you need to have run git lfs install at least once on your machine (for each individual user). That installs the hooks and filters required for Git LFS to work.
If you haven't done that, do that, and then you should be able to fix your repository by doing git lfs pull to pull the large files. If you're using a tarball or zip file link on GitHub, then you have to go into the settings and enable LFS support in archives, since by default LFS files are not included.
Related
I'm new to GitHub and Machine Learning.
I've been using Conda and Jupyter Notebook for my tests in ML.
It all was fine.
But I know that it's better to use VS Code (easer to code?) and GitHub(promote and share my code?). I don't really care about version control because I'm only doing my own fist steps.
But nevertheless I did create GitHub account and I try to create a Repo and push my already existing folders with Python files. These folders also contain raw and modified data that is used in the code... .csv and .xlsx files. Some of them are 100 Mb+
I use Mac M1 and I've tried to create .gitignore_global file (and it works - when I git add . from the Terminal files noted .gitignore_global don't push (upload).
I've also created a .gitignore file in my working directory.
And I use find ./* -size +100M | cat >> .gitignore to add these files in the .gitignore (and it adds).
But when I try to git init -b main , git add . , git commit -m "First commit", git remote add origin <REMOTE_URL> and git push -u origin main it still tries to upload 100m+ files.
I've tried to delete the whole git subfolder and Repo on the site... it doesn't work.
What should I do in order not to upload (push) these files?
How do you use GitHub for DataScience / Machine Learning with these limitations?
It's really impossible not to use all the data files...
Please see above. I've tried several ways
I am trying to run Xcode Cloud on my unit tests, which include a large number of snapshot tests using png images that are all stored using Git LFS. But when I run the tests on Xcode Cloud, the logs indicate that the images aren't on disk, implying they haven't been downloaded from Git LFS. The documentation says Xcode Cloud comes with Git LFS support but doesn't indicate you need to do anything special to set it up for Xcode Cloud. I've connected Xcode Cloud to my repo, and it shows the tests running, but they're failing because the images are missing.
I have a .gitattributes file at the root level of my repository which contains rules for adding various image file formats to Git LFS. For example, one line says:
*.png filter=lfs diff=lfs merge=lfs -text
What am I missing here? How do I get Xcode Cloud to fetch Git LFS files when it checks out my repo?
I decided to backup all my github data and found this: https://help.github.com/en/github/understanding-how-github-uses-and-protects-your-data/requesting-an-archive-of-your-personal-accounts-data
I managed to get the .tar.gz file and it seems to contain all my repositories but there is no source code in there. Judging by the size, it looks like some kind of archive in objects/pack/*.pack
Is there any way to access original source code?
it looks like some kind of archive in objects/pack/*.pack
According to Download a user migration archive:
The archive will also contain an attachments directory that includes all attachment files uploaded to GitHub.com and a repositories directory that contains the repository's Git data.
Those might be bare repositories or bundles.
Once uncompressed, try and git clone one of those folders (to a new empty folder)
The OP johnymachine confirms in the comments:
git clone .\repositories\username\repository.git\ .\repository\
Meaning repository.git is a bare repo (Git database only, no files checked out)
How to download raw file in GitHub?
I am trying to download a concrete (RAW) file.
The GitHub reports size 16.7 MB (see screenshot bellow), when clicked to RAW it only displays text containing few bytes.
Screen
You can use git-lfs to download content from this pointer files.
Install git-lfs, for mac use brew install git-lfs.
Clone the repo.
Run the command git lfs pull.
Reference : git-cloning-giving-pointer-file
Solution for this particular problem can be to download the files from this repository
https://drive.google.com/drive/folders/1cJLPgGfEuFAQzBKbXQtSGXxLXssw1D9f
Anyway, if there is any way how to download HDF5 files from github, it would be very useful.
I want to enable LFS for my project, hosted on GitHub. I use Neon with EGit/JGit 4.7.0.201704051617.
I also have git/2.12.2.windows.2 and git-lfs/2.1.0 .
Just for test, I do :
git lfs track "*.dll"
If I had a .dll file and commit, github show this kind of content for the file :
version https://git-lfs.github.com/spec/v1
oid sha256:f81cee5f00c704e18b1c0372e026d2a0f56ff0957d37835c9ca36d6fef2bdcef
size 1024
Then the pull failed for egit and even for git. So I have to delete this entry.
If I commit using git command line, the file is ok on github and egit can pull it.
I do many tries without success. My testing repo is here : https://github.com/nicolas-albert/TestGit
Have you set up your .gitconfig to reference the LFS filters using:
git lfs install
Having done that you set up your project's .gitattributes file to specify which files should be managed by LFS. Then generally use standard Git commands with no need to reference LFS commands directly.
*.dll filter=lfs diff=lfs merge=lfs -text