Cannot remove folder from push #21414
-
I’m in a bit of a bind. I started a repository on Github and am trying to push some previously written code to the website. However, the venv folder (which contains my python virtual environment) is included when I push. Git throws an error about how the remote rejected the push because a files in the venv folder was too big. I added a ‘.gitignore’ file, adding the line ‘venv/*’. I also ran:
When I try to push, the initial error still remains. For some reason, the venv folder still appears to be included when I push. So for some reason, I must have not removed the folder effectively from the push. I’ll just take a look at the list of files that are being committed:
Wait! ‘venv’ isn’t even listed! So how does it get pushed? Here is my code folder: https://drive.google.com/file/d/11kWxEbNaFGZr8oobflu3Tw_i7hh3H0D9/view?usp=sharing Here is the output I get now when I try to push:
Here is the git log:
|
Beta Was this translation helpful? Give feedback.
Replies: 4 comments
-
I found a thread that has a similar problem: |
Beta Was this translation helpful? Give feedback.
-
I managed to resolve this by:
|
Beta Was this translation helpful? Give feedback.
-
Since venv is a directory, next time you run into this you can pass Then you can of course add that dir to your .gitignore There’s also preload ignores for multiple languages when creating a repository! |
Beta Was this translation helpful? Give feedback.
-
Only command that worked for me without deleting the venv in local machine. |
Beta Was this translation helpful? Give feedback.
I managed to resolve this by: