我从我的项目中检出特定提交并从那里继续,希望该提交之后的更改将被删除,并且我检出的那个提交将是新的头。我提交了新的更改,但我无法推动它们。我还是 git 的新手。
我所做的是:
我有:
To https://github.com/myusername/project.git
! [rejected] master -> master (fetch first)
error: failed to push some refs to 'https://github.com/miloradsimic/ISA16.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 …Run Code Online (Sandbox Code Playgroud)