【问题标题】:Could not remove sensitive data无法删除敏感数据
【发布时间】:2012-11-01 12:52:22
【问题描述】:

我在从我的一位 git 代表中删除敏感数据时遇到问题。 我阅读了https://help.github.com/articles/remove-sensitive-data 的手册页,并一一按照说明进行操作。

起初我成功地做到了:

$ git clone https://github.com/defunkt/github-gem.git

接下来我成功了

$ cd github-gem

然后我尝试了以下但没有成功并收到以下消息

$ git filter-branch --index-filter 'git rm --cached --ignore-unmatch Rakefile' --prune-empty --tag-name-filter cat -- --all

fatal: ambigous argument 'rm': unknown revision or path not in the working tree. Use '--' to seperate paths from revisions

有人可以帮忙吗?

【问题讨论】:

    标签: git


    【解决方案1】:

    我知道已经有一段时间了,但为了后代: 我与这个问题斗争了一段时间 - Windows 上的解决方案是使用 "(双引号)而不是 '(单引号)。

    【讨论】:

      【解决方案2】:

      我认为即使使用--ignore-unmatch,您仍然需要-- 消歧器。喜欢:

      git rm --cached --ignore-unmatch -- Rakefile
                                       ^^-this two dashes here
      

      【讨论】:

      • 感谢回复。我试过了,但得到了同样的错误信息:-(知道我正在使用 Windows 7 可能会有所帮助。
      猜你喜欢
      • 2011-08-22
      • 2015-09-11
      • 1970-01-01
      • 2013-12-24
      • 1970-01-01
      • 2018-10-10
      • 2015-07-31
      • 2018-01-16
      • 1970-01-01
      相关资源
      最近更新 更多