比如gitee这种平台,直接修改再提交,提交时候把信息改掉
这样做,下次提交会产生另一个问题,因为远程仓库改了本地没有,会报错
! [rejected] master -> master (fetch first)
error: failed to push some refs to 'https://gitee.com/dt108/notes.git'
hint: Updates were rejected because the remote contains work that you do
hint: not have locally. This is usually caused by another repository pushing
hint: to the same ref. You may want to first integrate the remote changes
hint: (e.g., 'git pull ...') before pushing again.
hint: See the 'Note about fast-forwards' in 'git push --help' for details.
如果远程的没有本地重要可以选择git push origin master -f
强制覆盖掉,也可以把远程拉下来合并一下再上传.
gitee如果忘了username和password可以在设置–>资源管理–>凭证管理—>新增凭证 点开可以看到预填的id 和密码