is-blob | Check if a value is a Blob | Identity Management library
kandi X-RAY | is-blob Summary
kandi X-RAY | is-blob Summary
Check if a value is a Blob
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 is-blob
is-blob Key Features
is-blob Examples and Code Snippets
Community Discussions
Trending Discussions on is-blob
QUESTION
I'm trying to clean up a git repository of latex code that contains the generated pdf files, because these files have caused the repo to balloon up to a size of 300mb.
Adapting a bit from the answer here How to remove file from Git history?. I tried the following command:
git filter-branch -f --index-filter 'git rm --cached --ignore-unmatch *.pdf' HEAD
This reduced the size a little, but not as much as i'd hoped. When I then try the script found in the answer to this question: How to find/identify large commits in git history?, to find which files contribute to the size, it still shows several pdf files. However, if i try the script found in this question: Which commit has this blob?, it cannot find any commit that contains the file.
I have removed all branches except the local branch. I have not pushed the changes to the remote.
Is there any reason these files would still persist in the history somewhere? What other things can I try?
...ANSWER
Answered 2020-Dec-18 at 13:35You may have blobs still present just because the garbage collector didn't collect them.
Try cloning your local repo, and check the size of the .git/
directory in that new clone :
QUESTION
My Question is similar to this which doesn't have an answer. I tried to search many other places but still don't have an answer.
I'm trying to download file using Axios in VueJs as a blob:
...ANSWER
Answered 2020-May-28 at 02:47Using vue-resource solved this issue. Although it will be retiring in future releases, I couldn't find a better way to do it as Axios was not able to handle it.
Following is the code:
main.js
QUESTION
Following is a situation.
Project source code hosted on a some git service provider (e.g Bitbucket). - Size over 1GB We migrated all the work to new git service provider with some pruning to delete old large files and objects (e.g Github) - Size 500MB.
It has been few weeks since the transition. All of a sudden now the repo size is over 1.8GB, and behold we have some old objects that were deleted as part of the old repo.
Now how do I find the commit/push that caused this? I know when it happened after but can't pinpoint the commit or the branch that might be causing this. Also is there an easier way to revert the push to get the repo size back to normal ?
Another question would be, how can I prevent these object being pushed back again by accident?
My search landed me on following SO relevant answers but came back empty handed.
refs:
...ANSWER
Answered 2017-Oct-27 at 19:06Git is very much oriented to the idea of adding new things (commits and their underlying objects) to the database, without ever removing any old things.
When you do manage to remove some old thing(s), if Git ever encounters them again, it sees them as new things and adds them back in. You can, if you like, think of this as getting "re-infected". Every copy of the repository that has the "infection" is "contagious", and touching any of them (via git fetch
or git push
) can bring back the objects you thought you had gotten rid of.
Now how do I find the commit/push that caused this?
Finding a particular fetch or push that caused it is difficult-to-impossible. Finding the commit(s) that contain the large objects is possible; see the answer you linked, and other links within it.
Also is there an easier way to revert the push to get the repo size back to normal?
You must ditch the commit(s) that contain the large objects, and if there are later commits that you wish to retain that depend on those earlier commits, copy the later commits to new, different commits that no longer depend on the earlier commits. This is what git filter-branch
does. Once you have no branch tip that either point to, or have in their commit ancestry chain, the commits that have the large objects, you can re-pack and shrink the repository.
The BFG Cleaner is much easier to use (it does all this for you), but I have never used it.
... how can I prevent these object being pushed back again by accident?
This is trickier. There are a number of approaches that work to varying degrees:
- Self-discipline by every person doing a push. Before pushing, everyone who pushes must make sure they will not be re-introducing the unwanted large objects. Obviously, this works only to the extent that people exercise it.
- Limit the set of people who are allowed to push. This reduces the above problem to a small number of people.
- Use Git hooks to verify that a requested update will not introduce either any large object, or any specific (known by hash ID) previous large object. This requires that you be able to install and maintain hooks on your Git service provider. If that provider is GitHub, you cannot do this, but they already include a "reject large objects" hook so you don't have to anyway.
Community Discussions, Code Snippets contain sources that include Stack Exchange Network
Vulnerabilities
No vulnerabilities reported
Install is-blob
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