Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我正在处理一个遗留项目,该项目包含在存储库中一个应该被忽略的目录。该目录的内容在变基时会引起大量不相关的冲突。
有没有办法从历史记录中完全删除这个目录(好像它从一开始就被 gitignored 了)?
你想要git filter-branch,它将重写你分支中的每个提交。
git filter-branch
请注意,这会破坏拉动(就像变基一样)。