0

我有一个决定公开的 git 存储库,这意味着将数据库连接信息移动到 .gitignored 文件中。但是,我的存储库历史仍然包含我添加然后删除信息的提交。

我已经使用交互式 rebase 尝试了这个问题的解决方案,但这似乎只允许我更改/重新排序提交消息,而不是提交中包含的代码。

4

1 回答 1

3

You should read this article from Github:

Remove sensitive data

But, the most important part of the article is certainly this quote:

Danger: Once the commit has been pushed you should consider the data to be compromised. If you committed a password, change it! If you committed a key, generate a new one.

于 2014-02-21T12:50:18.393 回答