0

I am facing an issue: a Github's message saying the files are too big. What should I do?

Context: I am using python and venv in Windows. When I want to upload the project the files that are part of the venv (libraries, etc) become part of the uploading process (I never see this before. I used to use Linux), therefore the total files that should be in Github are a lot (and heavy).

I am considering to put all these folders (related to venv) into a .gitignore folder so I can avoid this issue, but I wonder what would be the impact of the project if I decide to run it locally.

Do any face a similar issue before? how can I deal with this?

Newbie
  • 451
  • 1
  • 3
  • 14

1 Answers1

2

It's happening because you are trying to push all the dependency and library you installed locally on your computer to github and it's like it very large.

By right you only need to push your source code and requirement.txt file to GitHub. You don't need to push all those library you installed locally to github

create a .gitignore file and place your venv file path in it.

Example

.gitignore file

/venv


Maxwell D. Dorliea
  • 1,086
  • 1
  • 8
  • 20
  • thanks for your reply. The problem with this solution is that if you want to run your project locally you will see that you cannot do it bcs all the structures of the venv have been moving to the .gitignore folder. – Newbie Feb 10 '22 at 14:51
  • Use ```pip freeze > requirements.txt``` It will save all your python libraries with current version into requirements.txt and then follow the step I show you – Maxwell D. Dorliea Feb 10 '22 at 15:19
  • I see what you mean. I need to run the requirement file every time I am going to run the script again. Thanks! – Newbie Feb 10 '22 at 15:35
  • You're always welcome – Maxwell D. Dorliea Feb 10 '22 at 15:47