lfs | linux utility to get information | File Utils library
kandi X-RAY | lfs Summary
kandi X-RAY | lfs Summary
A linux utility listing your filesystems. Complete documentation lives at
Support
Quality
Security
License
Reuse
Top functions reviewed by kandi - BETA
Currently covering the most popular Java, JavaScript and Python libraries. See a Sample of lfs
lfs Key Features
lfs Examples and Code Snippets
Community Discussions
Trending Discussions on lfs
QUESTION
I recently upgraded all of my dependencies in package.json to the latest. I went from Angular 12.2.0 to 13.0.1 and github is now rejecting my push with the following file size error. Is there some setting I need to define in angular.json build profile that will help minimize these cache file sizes?
...ANSWER
Answered 2021-Nov-24 at 16:53Make sure your .gitignore
is in the parent folder of .angular
.
In that .gitignore
file, a simple .angular/cache/
should be enough to ignore that subfolder content.
Check it with:
QUESTION
Version:-1
I wasn't able to push a commit to the repository. Below is the message and screenshot I got from Sourcetree. I am using a Mac.
Error:-
...ANSWER
Answered 2022-Jan-18 at 07:50The GH001: Large file detected
(seen in the screenshot) seems to indicate the connection fails because your pushed commit is too big.
As mentioned, using LFS, or filtering large object from your history (using git filter-repo
as in here), are two alternatives.
QUESTION
It seems that the git team has been working on large binary file handling features that don't require git LFS - features like partial clone, and sparse checkout. That's great.
The one thing I'm not totally clear about is how these features are supposed to improve this issue:
Correct me if I'm wrong, but every time you run git status
, git quickly does a checksum of all the files in your working directory, and compares that to the stored checksums in HEAD
to see which files changed. This works great for text files, and is so common, and so fast an operation that many shells build the current branch, and whether or not your current working directory is clean into the shell prompt:
With large files however, doing a checksum can take multiple seconds, or even minutes. That means every time you type git status
, or in a fancy shell with a custom, git-enabled prompt hit "enter", it can take several seconds to checksum the large files in your working directory to figure out if they've changed. That means that either your git status
command will take several seconds/minutes to return, or worse, EVERY command will take several seconds/minutes to return while your current working directory is in the git repo, as the shell itself will try to figure out the repo's current status to show you the proper prompt.
This isn't theoretical - I've seen this happen with git LFS. If I have a large, modified file in my working directory, working in that git repo becomes a colossal pain. git status
takes forever to return, and with a custom shell, every single command you type takes forever to return as the shell tries to generate your prompt text.
Is this meant to be addressed by sparse checkout, where you just don't checkout the large files? Or is there something else meant to address this?
...ANSWER
Answered 2022-Feb-10 at 01:23Git stores certain information in the index, which reflects things like the file size, device and inode numbers, modification and inode change times, and various other attributes. If this information is changed, or is potentially stale, then Git will re-read the file to see if it's modified. This is potentially expensive, as you've noticed, and Git's detection here is the reason that Git LFS has this same performance problem: Git is telling Git LFS to reprocess the file.
What you want to do is find out what's modifying the attributes of your files. For example, if you have some sort of file monitoring or backup software, then that can cause this problem, or if you're using some sort of cloud syncing service (which you should avoid anyway because it will probably corrupt your repository). This can also happen if you mount the repository into a container, since the container will have different device and inode numbers, and then each time you alternate in which environment you run git status
, the entire repository must be re-read.
For example, on my systems, I don't have this problem and my system performs just fine. However, if you really can't figure it out, you can try setting core.trustctime
to false and/or core.checkstat
to minimal (which you should try in that order). That will put less data in the index, and then it's less likely to become stale when nothing's changed. However, it also means that it's more likely that Git will fail to detect a legitimate change, so if you can avoid needing to do this, you should.
QUESTION
ANSWER
Answered 2022-Jan-30 at 08:43If the files are in the lfs folder, it's that git needed them at a moment to populate your working directory.
So, no, there is no way to prevent git to cache them (except maybe by doing a sparse checkout if you really don't need to have the files handled by git-lfs in your working directory).
But you have an easy way to clean this cache directory (git will keep only the currently used files and delete the others unused) with the command:
QUESTION
I'm working on a project around embedded systems that needs to use filesystem. I want to use liitlefs crate in rust but it uses mem::uninitialized that deprecated since 1.39.0 . https://github.com/brandonedens/rust-littlefs
...ANSWER
Answered 2022-Jan-20 at 22:08You can't do uninit().assume_init()
— it's definitely not initialized. assume_init()
is only to be called once the data has been initialized with real values. The idea behind calling it is that you're promising, "Yes, I know this value is marked as maybe initialized. I promise that it is initialized now. It's not just a maybe."
You'll need to change the types of lfs
and lfs_config
:
QUESTION
I am completely unable to push to my GitHub master
branch. It is complaining about a 100+ MB file that isn't even part of the front-end, this file is part of a .Net backend. The front-end is Angular 13. These are separate projects.
What can I do here? I've exhausted all options.
It's complaining about an Angular webpack cache file ("4.pack"). I've added this to .gitignore
and have done what I can from the Git side without luck.
ANSWER
Answered 2022-Jan-16 at 20:35In addition of ignoring .angular/cache
, you can consider using git filter-repo
instead of the obsolete git filter-branch
or BFG.
That way, you would:
- install
git filter-repo
(python-based) - delete any large file in your history:
git filter-repo --strip-blobs-bigger-than 2M
for instance. (content-based filtering) - ignore
.angular/cache
- force push (
git push --force
: make sure to notify any collaborator on that repository)
QUESTION
We use on-premise Azure DevOps and are just starting to trial Git LFS. I've installed the latest client (3.0.2) alongside my git (2.31.1.windows.1 installed by Visual Studio IIRC) and everything initially looked good when cloning a Git repo from DevOps that has LFS files.
However my local repo only has references to the LFS files and when trying to run commands like git lfs pull
(or fetch, or pushing a new LFS tracked file) I get authentication errors relating to http://:8080/tfs///_git/.git/info/lfs
- i.e. a subpath of our git repo URL.
Googling has shown other people with similar problems but not clear answer what is happening, or why, or how to fix it. I don't understand if it's a DevOps implementation issue, or a local client issue on my side.
I did come across discussion about Git LFS not using the same credentials or authentication types as Git, or maybe looking in a different place for them - note we are on-premises using HTTP not HTTPS, maybe this is a factor?
...ANSWER
Answered 2022-Jan-14 at 19:57Git LFS uses a different HTTP and TLS library than the one in Git. Git uses libcurl, and Git LFS uses the Go HTTP library. As a result, the supported authentication logic is different, although both programs will use the Git credential helpers and other credential lookup logic.
Since you mention Azure DevOps, my guess is that you're using NTLM. In 3.0, Git LFS removed NTLM because it had known bugs and nobody was interested in fixing them, and because it uses cryptography known to be insecure since 1995. Azure DevOps is the only major site known to use NTLM, and the Git LFS maintainers asked if they'd like to be involved in helping maintain it, and they declined.
NTLM can be handled in one of two ways: via the NTLM
authentication scheme or the Negotiate
scheme. The latter is also used by Kerberos, which both Git and Git LFS do support, and which is secure. Currently, if you have NTLM set up to use Negotiate
, Git LFS simply won't work, since it prioritizes Negotiate
over Basic
. In the upcoming 3.1, expected out this month or next, Git LFS will fall back to Basic
if Negotiate
fails, so you'll be able to work even if you have NTLM enabled on your instance.
I strongly encourage everyone to get rid of NTLM because it's so insecure. There's really no defensible reason to use it anymore: even Microsoft tells you to turn it off. If you turn off NTLM on your instance, or switch to Kerberos, things should just work. Otherwise, you'll need to wait for Git LFS 3.1 or explicitly set the authentication method to basic
in the configuration.
QUESTION
I have a MultiBranch Pipeline based off a Jenkins file which explicitly clones another repository provided by parameters. I'm seeing that the it is freezing, and timing out, after attempting to ask for credentials for git-lfs
as part of git checkout -f
command.
How can I checkout a repository with credentialed git lfs access?
Jenkinsfile:
...ANSWER
Answered 2022-Jan-05 at 11:59After enough debug. I found out what was going on.
By default the Git plugin won't provide credentials to most of the git commands (only fetch it appears), so when it does a checkout
it freezes waiting for credentials to access LFS.
By good design, though to my frustration, git/jenkins does not save the password anywhere on the machine and LFS objects are downloaded as part of the fetch. Setting up Jenkins to do LFS pull after checkout does not solve the issue as it is trying to do the LFS pull during the checkout.
The solution is to set GIT_LFS_SKIP_SMUDGE=1
in the global environment variables and add the LFS pull to the checkout steps to explicitly pull in LFS objects.
QUESTION
I have an index.html file that has a element (stored in Git LFS) set up as a background, however GitHub pages recently stopped loading it - it did work just a few weeks ago. There are also no issues in the console.
On the local server it works as expected in any browser, also all changes were pushed to git.
Has anyone run into a similar issue and would know how to fix it?
...ANSWER
Answered 2022-Jan-04 at 23:40Your file was working a few weeks ago but is now moved to their Git Large File Storage which means that assets/animation/star_burst.mp4
is now a text file pointing to the storage location.
Try to specify direct access link. Something like https://media.githubusercontent.com/media/AnnaxT/AnnaxT.github.io/main/assets/animation/star_burst.mp4.
You can get it by clicking on "view raw" button on https://github.com/AnnaxT/AnnaxT.github.io/blob/main/assets/animation/star_burst.mp4
Or just upload less larger file.
QUESTION
I Can not run apt to install git-lfs
on sagemaker notebook instance. I want to run git commands in my notebook.
ANSWER
Answered 2021-Dec-28 at 22:59use the following commands to install git-lfs
Community Discussions, Code Snippets contain sources that include Stack Exchange Network
Vulnerabilities
No vulnerabilities reported
Install lfs
Rust is installed and managed by the rustup tool. Rust has a 6-week rapid release process and supports a great number of platforms, so there are many builds of Rust available at any time. Please refer rust-lang.org for more information.
Support
Reuse Trending Solutions
Find, review, and download reusable Libraries, Code Snippets, Cloud APIs from over 650 million Knowledge Items
Find more librariesStay Updated
Subscribe to our newsletter for trending solutions and developer bootcamps
Share this Page