Make Git rebuild history using the current .gitignore

不羁岁月 提交于 2019-12-05 12:45:21

Remove those binary from the current cache if they were just added.

git rm --cached abinary

Then your .gitignore will automatically ignores those binaries.

But if they were committed in past commits, You won't loose history, but you still need to remove those binaries from said commit.
You will need either git filter-branch or bfg repo cleaner.

That will rewrite your history, and you will need a git push --force, so if you have more than one (yourself) collaborator, warn them in advance.

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!