假设我有一个文件'A'我已经修改了文件并通过以下命令将其推送到存储库
git add A
git commit -m "changed A"
git push
后来我意识到我需要更改文件'B',所以我修改了它并运行了以下命令
git add B
git commit --amend -m "changed AandB"
git push
但我得到错误..
error: failed to push some refs to 'https://xxx@github.com/xx/xx'
hint: Updates were rejected because the tip of your current branch is behind
hint: its remote counterpart. Integrate the remote changes (e.g.
hint: 'git pull ...') before pushing again.
我应该怎么做才能克服这个错误