我已经更改了 git 存储库中某些目录的大小写。然后我推送它们并注意到未更新的情况。
然后我发现了这个问题: git mv and only change case of directory
我已按照以下建议使用:
git add -A
git commit --amend -m 'updated cases'
git push origin
但 git 服务器不是成功返回:
To git@github.com:kyogron/example.git
! [rejected] master -> master (non-fast-forward)
error: failed to push some refs to 'git@github.com:kyogron/example.git'
To prevent you from losing history, non-fast-forward updates were rejected
Merge the remote changes (e.g. 'git pull') before pushing again. See the
'Note about fast-forwards' section of 'git push --help' for details.
我现在可以做些什么来更新案例而不破坏我的 git 存储库?
问候,
博多
PS:为避免以后出现此问题,您可以使用:
git config core.ignorecase false