D
D
Denis Bukreev2016-10-17 21:33:11
git
Denis Bukreev, 2016-10-17 21:33:11

How to remove one of the old commits?

So it goes.
I didn’t notice that the gifs together take up half a GB and made a commit
. Now the repository weighs neither more nor less, but more than one GB (the customer asks that there be a ready-made assembly along with the sources, so that he only transfers the folder to the server and that’s it).
Well, that's not very good either.
Can I somehow remove this commit or files/folder from it?

Answer the question

In order to leave comments, you need to log in

3 answer(s)
F
FoxInSox, 2016-10-17
@denisbookreev

1. Google: git remove heavy commit
2. First line in the output list: stackoverflow.com/questions/8083282/how-do-i-remov...

N
Nazar Mokrinsky, 2016-10-17
@nazarpc

I usually do something very crooked (but it works): interactive rebase of a branch relative to another branch (or commit), in the window I choose to skip / change the desired commit (in PhpStorm there is a convenient graphical shell for this).
After the end of the rebase, do a push (if you really need it and understand what you are doing, then push --force).

O
OnYourLips, 2016-10-17
@OnYourLips

The commit needs to be deleted, but your main problem is different: you are not using the application's build system.
The repository should not be included in the production.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question