有没有一种方法或命令可以使用其ID从git中删除blob?
我使用了以下命令:
我使用了以下命令:
$ git rev-list --objects --all | git cat-file --batch-check='%(objectname) %(objecttype) %(rest)' | grep '^[^ ]* blob' | cut -d" " -f1,3-
并获取所有版本中的 blob 列表,例如
62f7e0df0b80bce8d0a4cb388be8988df1bec5ef NodeApplication/NodeApplication/public/javascripts/homescript.js
b1d69387fbd4d4e84bbe9eb2c7f59053c0355e11 NodeApplication/NodeApplication/iisnode/index.html
624642d6f2a86844dc145803260537be0fe40090 NodeApplication/NodeApplication/.ntvs_analysis.dat
现在我想要删除这个blob
NodeApplication/NodeApplication/.ntvs_analysis.dat.
我该怎么做呢?
git filter-branch
,请参考 https://help.github.com/articles/remove-sensitive-data/。 - David Duponchel