D
D
Dmitry2020-09-29 16:43:35
git
Dmitry, 2020-09-29 16:43:35

How to delete a private git repository folder?

I created a task branch, created a folder in it and placed the files, then pushed everything into a private repository. For some reason, another folder with another project was pushed into it ... Roughly speaking, [folder1] is on the computer, and [folder1, folder2] is in the turnip.
I would understand if I deleted it locally and there via rm. But how to delete a folder on a remote repository?
I have already tried several options, but none of them fit :(
Please tell me.

Answer the question

In order to leave comments, you need to log in

1 answer(s)
P
philuchkoff, 2020-10-01
@philuchkoff

You can also try:

git filter-branch --tree-filter "rm -rf ПУТЬ-ДО-УДАЛЯЕМОЙ-ДИРЕКТОРИИ" HEAD
git push origin master --force

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question