Git offers pretty strong guarantees about the integrity of the repository. Running git filter-branch
is a deep surgical operation that results in a completely new repository with all the commit checksums recalculated etc. You have in fact rewritten the whole history of the project, so during fetching and merging changes from the old repository Git will correctly complain that it doesn't recognize the new, changed history of the repository. There's no way for Git to have split personality and at the same time remember and forget about the rest of the directories.
As you say, you're new to Git, so please reconsider if you really need to do such deep and intrusive surgical operations on your repository.