hacktivist123 / goignore

A lightweight CLI tool for generating .gitignore file in your project. Built with Go and ❤️
MIT License
29 stars 6 forks source link

Problem with large repository #27

Open noornee opened 1 year ago

noornee commented 1 year ago

We have a large repository; about (~ 11MB).

Screenshot

goignore_large_repo

This is because the binary file for goignore was accidentally? committed and even though its been deleted already, it's still in the github history.

I tried looking for way to remove a large file from a github history and most of what i found were kind of tricky for me to wrap my head around until i came accross this article

what do you think? @hacktivist123 @quamejnr @chuksgpfr @AdeboyeDN is there a better way to do this?

p.s. I created a random private repo to test this and it worked. I cant tell if its not going to cause some issues for a repo like this with forks..

chuksgpfr commented 1 year ago

There's a way to delete it from the ~HEAD. I'll do it when I'm on my laptop.

noornee commented 1 year ago

There's a way to delete it from the ~HEAD. I'll do it when I'm on my laptop.

alright, great! please when you do, i would love to see the git command you used. Tyyy ^^

chuksgpfr commented 1 year ago

First i need to find the commit

chuksgpfr commented 1 year ago

This commit committed a binary file

hacktivist123 commented 1 year ago

Damn, that was me, I thought I deleted the binary. Please let me know how you deleted it if you do

noornee commented 1 year ago

This commit committed a binary file

@chuksgpfr The first commit also has a binary file committed to it

hacktivist123 commented 1 year ago

still doing this @chuksgpfr ?

chuksgpfr commented 1 year ago

Yeah. I'll get it done today.

hacktivist123 commented 1 year ago

Thanks my boss

chuksgpfr commented 1 year ago

I am back here. @noornee how did you see the size of the repo? I got 245KB

noornee commented 1 year ago

I am back here. @noornee how did you see the size of the repo?

Welcome! I cloned and checked the size of the goignore directory with du

Screenshot

goignore_large_repo

... I got 245KB

strange. how did you check the size? or have you successfully run the git commands to purge the binary files from goignore's history ?

chuksgpfr commented 1 year ago

Different sizes. The size that was downloaded from GitHub using this command curl https://github.com/hacktivist123/goignore > /dev/null | grep size | tr -dc '[:digit:]' is different.

hacktivist123 commented 1 year ago

What are the sizes?

noornee commented 1 year ago

Different sizes. The size that was downloaded from GitHub using this command curl https://github.com/hacktivist123/goignore > /dev/null | grep size | tr -dc '[:digit:]' is different.

i dont think this command would give you the size of the github repo. it just downloads the webpage and prints the lines that matchs the size pattern and essentially outputs the digits.

ss

invalid

you could access the size of the repo using the github api.

i.e.

curl --silent https://api.github.com/repos/hacktivist123/goignore | grep size

p.s. the size it would give you would be in kilobytes. but its approximately 11MB

noornee commented 1 year ago

What are the sizes?

you could check the size of the repo with a GUI filemanager. the size is approx 11MB.

SCREENSHOT

thunar_goignore_size