سؤال

I'm working with a legacy project that included in the repository a directory that should have been ignored. The contents of this directory is causing a huge number of irrelevant conflicts while rebasing.

Is there a way to completely remove this directory from the history (as if it had been gitignored from the beginning)?

هل كانت مفيدة؟

المحلول

You want git filter-branch, which will rewrite every commit in your branch.

Beware that this will break pulls (just like rebase).

مرخصة بموجب: CC-BY-SA مع الإسناد
لا تنتمي إلى StackOverflow
scroll top