B
B
BonBon Slick2017-10-22 12:42:42
git
BonBon Slick, 2017-10-22 12:42:42

Git commits files that need to be gitignore, ignored?

There is a gitignore file in the root of the project, the path to the folder that must be ignored is registered there:
/assets/imgs/folder
However, it is committed ..., there are 40,000 pictures, this will immediately fill up all the memory and exceed the project weight limit on the git.
I tried to remove it from the cache:
git rm -r --cached assets/imgs/folder
I also tried clearing the commit cache completely:
git rm -r --cached .
It deleted, committed, sort of deleted, but now when I push origin dev , it commits with pictures...
Checking through:
git diff --stat --cached origin/development
Lists all those pictures that will be pushed.
I tried cloning single-branch dev, deleting pictures and pushing without pictures, they are still in the push, the commit is about 5 GB...
I also tried deleting the branch and recreating it with a clean history, anyway the pictures got pushed out of nowhere.
Please tell me what am I missing?

Answer the question

In order to leave comments, you need to log in

2 answer(s)
I
Interreto, 2017-10-22
@BonBonSlick

Are the files already committed to the local repository?

M
mdss, 2017-10-22
@mdss

perhaps the problem is in the slash at the beginning of the path

/assets/imgs/folder

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question