我正在尝试将更改推送到远程服务器并遇到“更改已关闭”错误,那是因为尝试推送的更改 ID 与已推送的早期更改相同(不知道为什么相同),我尝试了要使用 .git/hook 生成新的提交消息,它会生成一个新的提交消息,但我的更改 ID 仍然相同,我仍然无法推送,关于为什么没有生成新的更改 ID 的任何输入?
<username:promt>git push ssh://repo.company.com:29418/platform/vendor/com-proprietary/radio HEAD:refs/for/master
Counting objects: 1852, done.
Delta compression using up to 8 threads.
Compressing objects: 100% (688/688), done.
Writing objects: 100% (809/809), 1.37 MiB, done.
Total 809 (delta 678), reused 177 (delta 95)
remote: Resolving deltas: 100% (678/678)
remote: Processing changes: refs: 1, done
To ssh://username@repo.company.com:29418/platform/vendor/com-proprietary/radio
! [remote rejected] HEAD -> refs/for/master (change 219386 closed)
error: failed to push some refs to
'ssh://username@repo.company.com:29418/platform/vendor/com-proprietary/radio'
尝试使用以下方法生成更改 ID
cd .git/hooks
scp -p -P 29418 username@repo.company.com:hooks/commit-msg .
cd ../..