kandi X-RAY | bfg Summary
kandi X-RAY | bfg Summary
Even though a prebuilt make_bfg executable is given in the repository, you should compile it for your system:.
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 bfg
bfg Key Features
bfg Examples and Code Snippets
Community Discussions
Trending Discussions on bfg
QUESTION
I have a repo that is 3.6GB. In order to clean this up, I removed all large files then pushed the deletions to the remote git repo hosted in BitBucket. After this, I deleted my .git directory on my local. I did git init and pushed all the existing files to the existing remote repo.
Despite this, BitBucket is still telling me that the repo is too big? I looked at various solutions on the internet but all of them seem to be referencing BFG and other cleaning tools. I was under the impression that all of these scripts just clean up .git. By deleting .git I was hoping that any unnecessary files would be deleted but that's clearly not the case.
If my .git directory is not the issue, I was wondering what else it could be?
...ANSWER
Answered 2022-Mar-09 at 16:51Deleting your local .git
directory doesn't delete the remote Git directory, which will still contain all the old stuff, including the earlier history of the repo and every version of every file ever committed to it.
If you delete all references such that the entire history of the repository is no longer reachable from any existing branch, then Git should garbage collect it eventually, possibly around two weeks if I recall correctly. If you have shell access, you can run git gc
yourself.
Your better bet is to delete and recreate the remote repo, if you truly don't want any of the project's history.
QUESTION
I'm struggling on how can I remove values from a column that are different only on the sign. For example:
...ANSWER
Answered 2022-Feb-14 at 19:25You can pair positive numbers with negative ones, one by one. Then remove all the matches.
For example:
QUESTION
I was trying to create a new view out of 3 or 4 other views/tables.
TableA:
title_id homeTeam 1234 WSV 5678 SSV 7890 NULL 4321 SCCTableB:
title_id awayTeam 1234 SSV 5678 SFV 7890 NULL 4321 KFCTableC:
title_id homeTeam 1234 SSV 5678 NULL 7890 AAB 4711 BFGI would like to generate a new view out of those three which looks like:
title_id Teams 1234 WSV, SSV, SSV 5678 SSV, SFV, N/A 7890 N/A, N/A, AAB 4321 SCC, KFC, N/A 4711 N/A, N/A, BFGAs you can see, NULL should be renamed to N/A, as well if id doesn't exist in one of the other tables. And I would like to get DISTINCT title_id.
@DaleK sure, i tried it like this:
select tableA.title_id, ISNULL(tableA.homeTeam, 'N/A') + ',' + ISNULL(tableB.awayTeam, 'N/A') + ',' + ISNULL(tableC.homeTeam, 'N/A') as Teams from tableA, tableB, tableC;
This leads into an neverending query for my tables which has each more than 300k rows.
Next i tried join:
select tableA.title_id, ISNULL(tableA.homeTeam, 'N/A') + ',' + ISNULL(tableB.awayTeam, 'N/A') + ',' + ISNULL(tableC.homeTeam, 'N/A') as Teams from tableA FULL JOIN tableB ON tableB.title_id = tableA.title_id FULL JOIN tableC ON tableC.title_id = tableA.tile_id
But to be honest i wasnt sure about the number of rows.
...ANSWER
Answered 2022-Feb-14 at 08:28Try this:
QUESTION
I have a BitBucket repository that shall be migrated to Github. It is using git lfs for large files and has a few corrupt lfs objects, which hinders the pushing to github (now the origin
in below command). The push always returns the error Your push referenced at least X unknown Git LFS objects
.
I'm now wondering if I can either ignore the pre-receive hook or drop/delete the lfs objects in question all together. I don't care much about these files, because they are quite old already and by now not even in the repo anymore.
...ANSWER
Answered 2022-Jan-20 at 12:55I did retry the approach with BFG repo cleaner and it did work nicely now. Also, I did directly push to the new repo (Github), which has the advantage that the original repository is not touched by the update at all.
So following measures allowed me to migrate the repo from Bitbucket to Github while deleting the corrupt files from the repository.
QUESTION
We are trying to shrink our git repository to under 500MB due to deployment issues.
To achieve that, we have created a new branch where we have moved all old images, videos and fonts to AWS S3.
I can easily get the list of files with git diff --name-only --diff-filter=D master -- public/assets/
.
Now, I have tried to run BFG-repo-cleaner 1.14.0 on each file. But I have 400 files and it is taking ages to delete each files separately (still running as I'm writing this).
git diff --name-only --diff-filter=D master -- public/assets/ | xargs -i basename '{}' | xargs -i bfg --delete-files '{}'
Since each file is distinct, I can not really use a glob pattern, as suggested at Delete multiple files from multiple branch using bfg repo cleaner.
I tried to separate each file with a comma but that resulted in BFG-repo-cleaner telling me:
BFG aborting: No refs to update - no dirty commits found??
Is there a way to provide multiple files to BFG-repo-cleaner without a glob pattern?
PS. The command I tried with multiple files is: git diff --name-only --diff-filter=D master -- public/assets/ | xargs -i basename '{}' | sed -z 's/\n/,/g;s/,$/\n/' | xargs -i bfg --delete-files '{}' && git reflog expire --expire=now --all && git gc --prune=now --aggressive
PPS. The bfg
command is on my PATH as a simple bash script with java -jar /tools/BFG-repo-cleaner/bfg-1.14.0.jar "$@"
ANSWER
Answered 2021-Dec-17 at 00:26But I have 400 files and it is taking ages to delete each files separately
That is why the tool to use (python-based) is newren/git-filter-repo
(see installation)
That way, you can feed that tool a file, with the list of files in it:
QUESTION
Following my previous question about a way to clear 'hidden' large files in gitlab
repo. I proceeded as follows:
Clone repo using mirror
flag:
ANSWER
Answered 2021-Nov-22 at 23:16The HTTP 524 status code is specific to Cloudflare. It indicates that a timeout occurred. Like other 5xx codes, it indicates a problem with the server that the client cannot control. Thus, there is nothing you can do to fix this.
You can either try again later, or contact GitLab about the problem.
QUESTION
suppose I have been given strings "abc", "def" and "ghi", I want to generate all the possible combination of word generated by picking from these strings. for eg for "abc", "def" and "ghi"
we should get
"adg","adh","adi","aeg","aeh","aei","afg","afh","afi", "bdg","bdh","bdi","beg","beh","bei","bfg","bfh","bfi", "cdg","cdh","cdi","ceg","ceh","cei","cfg","cfh","cfi"
How to Do it.
my attampt...
...ANSWER
Answered 2021-Oct-28 at 08:02This is one example where recursion allows simpler code: you just have to combine all characters from the first word with the permutations of the other ones.
In C++ it could be:
QUESTION
I have a repo which is 1.4Gb, altho the actual code is more like 250Mb. I'm trying to use bfg
to get the size down.
When running git clone --mirror https://xxx@bitbucket.org/xxx/my-app.git
I'm getting:
...ANSWER
Answered 2021-Sep-24 at 16:57I think you're running into the "server side times out while client side is processing the received data" bug-ette. To get around it—this method may not work, but is worth a try—you can start with:
QUESTION
All answers I see regarding this question (here, here) only ever offer ways to either change the most recent commit(s) or all commits, however I want to change the author of only past commits that match a certain predicate. I have looked at git filter-branch (deprecated), git-filter-repo (its replacement), and bfg, but can't figure out how to make this change.
The way I intuitively tried to approach this is:
- First find all commits that I'm trying to change.
- Change author of those commits.
I have other commits in the history with the same author that I do not want to change, I only want to change commits that match a certain predicate.
So for step 1, find all commits whose commit messages have a specific substring:
...ANSWER
Answered 2021-Sep-04 at 23:11Thanks to @phd's help, I was able to figure out a working solution:
QUESTION
local : a - b - c - d - e
remote : a` - b` - c`
...ANSWER
Answered 2021-Jul-28 at 05:50This is another approach, a long one, but interesting for learning.
1- Make shure you are in the local branch you want to update
Community Discussions, Code Snippets contain sources that include Stack Exchange Network
Vulnerabilities
No vulnerabilities reported
Install bfg
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