或者做一个 交互式rebase 删除那些你想要删除的提交(commit)里所对应的行。 我尝试推一个修正后的提交(amended commit)到远程,但是报错: To https://github.com/yourusername/repo.git ! [rejected] mybranch -> mybranch (non-fast-forward) error: failed to push some refs to 'https://github.com/tan...
$ git rebase --onto SHA1_OF_BAD_COMMIT^ SHA1_OF_BAD_COMMIT $ git push -f [remote] [branch] 或者做一个 交互式rebase 删除那些你想要删除的提交(commit)里所对应的行。 我尝试推一个修正后的提交(amended commit)到远程,但是报错: To https://github.com/yourusername/repo.git ! [rejected] my...
$gitrebase--ontoSHA1_OF_BAD_COMMIT^SHA1_OF_BAD_COMMIT $gitpush-f[remote][branch] 或者做一个 交互式rebase 删除那些你想要删除的提交(commit)里所对应的行。 我尝试推一个修正后的提交(amended commit)到远程,但是报错: Tohttps://github.com/yourusername/repo.git ![rejected]mybranch->mybranch(non...
$ git rebase --onto SHA1_OF_BAD_COMMIT^SHA1_OF_BAD_COMMIT $ git push-f [remote] [branch] 或者做一个 交互式rebase 删除那些你想要删除的提交(commit)里所对应的行。 我尝试推一个修正后的提交(amended commit)到远程,但是报错: To https://github.com/yourusername/repo.git! [rejected] mybranch...
$ git push -f [remote] [branch] 或者做一个 交互式rebase 删除那些你想要删除的提交(commit)里所对应的行。 我尝试推一个修正后的提交(amended commit)到远程,但是报错: To https://github.com/yourusername/repo.git ! [rejected] mybranch -> mybranch (...
gitcommit 把暂存的内容添加到上一次的提交 gitcommit--amend 附加消息提交 gitcommit-m'commit message' 修改提交信息 如果你的提交信息写错了且这次提交(commit)还没有推送(push),可以使用以下命令修改: gitcommit--amend 或者 gitcommit--amend -m 'xxxxxxx' ...
$ git push -f [remote] [branch] 或者做一个 交互式rebase 删除那些你想要删除的提交(commit)里所对应的行。 我尝试推一个修正后的提交(amended commit)到远程,但是报错:To https://github.com/yourusername/repo.git ! [rejected] mybranch -> mybranch (non-fast-forward) ...
我尝试推一个修正后的提交(amended commit)到远程,但是报错: 注意, rebasing(见下面)和修正(amending)会用一个新的提交(commit)代替旧的, 所以如果之前你已经往远程仓库上推过一次修正前的提交(commit),那你现在就必须强推(force push) ()。注意 – 总是 确保你指明一个分支!
$ gitrebase--ontoSHA1_OF_BAD_COMMIT^ SHA1_OF_BAD_COMMIT$ gitpush-f[remote] [branch] 1. 2. 或者做一个 交互式rebase 删除那些你想要删除的提交(commit)里所对应的行。 我尝试推一个修正后的提交(amended commit)到远程,但是报错: 复制
$ git push -f [remote] [branch] 或者做一个 交互式 rebase 删除那些你想要删除的提交 (commit) 里所对应的行。 我尝试推一个修正后的提交 (amended commit) 到远程,但是报错: To https://github.com/yourusername/repo.git ! [rejected] mybranch -> mybranch (non-fast-forward) ...