D
D
Denis Bukreev2017-10-19 16:26:45
git
Denis Bukreev, 2017-10-19 16:26:45

What is the correct way to remove a file from git?

I accidentally forgot to put the video folder in .gitignore and the 250-meter video flew straight to the repository, making it ten times heavier.
How can I delete this file so that it leaves the repository completely?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
O
Oblfakir, 2017-10-19
@denisbookreev

git log -> git reset "commit hash prior to that commit with vidos" -> git add "All files except vidos" -> git commit -m "message" -> git push --force origin "branch"

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question