我使用了以下命令
$ git filter-branch --force --index-filter \
'git rm --cached --ignore-unmatch Qt_Creator_Tutorial.pptx' \
--prune-empty --tag-name-filter cat -- --all"
成功删除文件历史记录,但当我使用cmd git push origin --force --all
推送到远程存储库时,它失败并显示以下错误消息:
Counting objects: 23, done.
Delta compression using up to 8 threads.
Compressing objects: 100% (14/14), done.
Writing objects: 100% (14/14), 1.41 KiB | 0 bytes/s, done.
Total 14 (delta 7), reused 0 (delta 0)
remote: Resolving deltas: 100% (7/7)
remote: Processing changes: done
To ssh://zhongle@192.168.2.11:29418/CM_doc
! [remote rejected] master -> master (non-fast forward)
error: failed to push some refs to 'ssh://zhongle@192.168.2.11:29418/CM_doc'
我已设置git config receive.denyNonFastForwards false
,但仍然失败,有人有任何建议吗?
谢谢, 利奥