S
S
Stanislav Pochepko2015-12-15 18:51:01
git
Stanislav Pochepko, 2015-12-15 18:51:01

How to upload a project with large files to Github?

Good evening. How to upload a project to gitHub that has large files in its commits. The commits once included log files of 250 mb each. I have now excluded them with .gitignore and git rm --cache. They are not in the latest commits, but when I want to push them to GitHub, he wants to push them there too. As I understand it, you need to somehow fill in only the last commit? or you need to delete past commits and make the last one HEAD.

Answer the question

In order to leave comments, you need to log in

2 answer(s)
A
aol-nnov, 2015-12-15
@aol-nnov

with an interactive rebase, you can edit previous commits. after deleting the logs from the history everything will be fine.
or, if the history is not important, using the same interactive rebase, you can "blind" old commits.

N
Nazar Mokrinsky, 2015-12-15
@nazarpc

There is an option to start a new branch from the problematic commit where a large file appeared, edit it, and then rebase the existing branch relative to the branch with the edited commit.
The commit dates will be rewritten, I suppose, but in general the change history will remain intact. You may have to do the procedure several times.
I recommend making a copy of the repository for conversions, as these are very dangerous things if you have not done this before.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question