I
I
Ivan Anikin2018-11-01 14:20:10
git
Ivan Anikin, 2018-11-01 14:20:10

Mistakenly brought the bitrix kernel under Version Control. What to do?

The situation is this:
The project was originally launched along with the kernel.
well, respectively, in addition to the fact that it took up a lot of space + if you install updates and a kernel change committee on the test, then when transferring to the master, those changes that were applied to the base during the update will still not be applied and as a result, our new kernel code will not work correctly on the old base and the updates will not be rolled up anymore, since they did not try on correctly.
to get the bitrix core out of version control, I did the following
, added the following rules to .gitignore:
bitrix/activities/
bitrix/admin/
bitrix/backup/
bitrix/cache/
bitrix/components/bitrix/
bitrix/css/
bitrix/fonts/
bitrix/gadgets /
bitrix/image_uploader/
bitrix/images/
bitrix/js/
... I can send the full list immediately as a file
But since the kernel is already present in the history, if changes occur in these files, they still get into tracking
, so I did the following:
I called on command folder data
git rm --cached -r like
git rm --cached -r bitrix/panel/ bitrix/components/bitrix/ ...
this marks files as deleted but does not actually delete them
. They get into the commit as deleted.
I did this in the branch where I developed it.
But now if I make a pool from the master, it seems to actually delete these files on merge ..
I see a very unpleasant picture that I have parts of the code of modules, components are missing and the site is breaking.
Now I have the following idea
in front of the pool with my branch on the master (combat site), I
- completely copy the gitignor with all exceptions
- I delete not by folders as before, but really EVERYTHING that falls under the ignore commands:
git rm -r --cached .
git add .
git commit -m "Removing all files in .gitignore"
- And only after that I do a pool with my branch Do
you think this will work?
Is there another option?
Have you encountered similar problems and how did you get out of these problems?

Answer the question

In order to leave comments, you need to log in

2 answer(s)
A
Alexander Momot, 2018-11-01
@AlexMt

And in the history of the git, a bold piece of data appeared, if on top of the commit where everything was deleted from the cache and .gitignore had already begun to do something else. If Bitrix with all the cache and other garbage took you 3-4 gigabytes, now these 3-4 gigabytes are sewn into history and will always be downloaded to the machine of the developer who makes a git clone (takes the bitrix into his folder for the first time)

A
Artem, 2018-11-01
@ulkoart

will work

git rm -r --cached .
git add .
git commit -m "Removing all files in .gitignore"

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question