V
V
Vladimir Eliseev2016-02-27 11:27:34
git
Vladimir Eliseev, 2016-02-27 11:27:34

How to clean up git?

Stupid question.
If you use git to store the site and subsequent development.
All the files that have ever been used in the process are stored in the .git folder
. It grows....
Is there a way at some point to kind of start "from scratch"? Delete all change history?

Answer the question

In order to leave comments, you need to log in

4 answer(s)
R
Roman Mirilaczvili, 2016-02-27
@progreccor

It must be remembered that

GIT - the stupid content tracker
Git will not do the work for the developer.
The fact that the .git folder grows is completely normal for any developing project.
Logically, you should prevent certain files from being committed to the repository by specifying masks in the project's .gitignore file.
Still, there is a way to clear the history of "random" files:
https://help.github.com/articles/remove-sensitive-data/
This article will explain how to use two of them: git filter-branch and the BFG Repo-Cleaner .

T
TyzhSysAdmin, 2016-02-27
@POS_troi

Create a new repository and put your files in it, leave the old one as a keepsake :)

A
aleksandr-n, 2018-08-16
@aleksandr-n

Answer to the question
https://www.youtube.com/watch?v=jRuaiXdzrXM

S
Svyatoslav Torg, 2017-07-05
@sefkiss

At a certain moment, when everything works smoothly) and no rollbacks are foreseen, I demolish .git and do git init on a new one))) Yes, it’s dumb) But 100 pounds)

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question