Git 推送错误

标签 git

我在分支中创建了一个文件,将其 merge 到master OK,但我推送时出错:

git Push origin master

 ! [rejected]        master -> master (non-fast-forward)
error: failed to push some refs to 'https://<a href="https://stackoverflow.com/cdn-cgi/l/email-protection" class="__cf_email__" data-cfemail="244a514a4d504b6450404f0a474b49" rel="noreferrer noopener nofollow">[email protected]</a>/
stash/scm/tdk-apps/tdk-admin-app.git'
hint: Updates were rejected because a pushed branch tip is behind its remote
hint: counterpart. Check out this branch and merge the remote changes
hint: (e.g. 'git pull') before pushing again.

这是git 状态:

# On branch development
nothing to commit, working directory clean

这是git pull

Password for 'https://<a href="https://stackoverflow.com/cdn-cgi/l/email-protection" class="__cf_email__" data-cfemail="afc1dac1c6dbc0efdbcbc481ccc0c2" rel="noreferrer noopener nofollow">[email protected]</a>/':
Already up-to-date.

最佳答案

假设您正在从事分支“开发” - 尝试在推送之前 pull 。提示中还建议:

git pull origin development

然后:

git push origin development

关于Git 推送错误,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/36429036/

相关文章:

git删除本地文件但将文件保留在repo中

git - Intellij 声称 index.lock 在不存在时存在

Git - 将分支名称移动到另一个分支

git - 使用 git rev-parse <tag> 的错误提交哈希

git - BitBucket 上的错误消息 "Someone has already registered this as a deploy key"

git - 如何 `--reference` 现有 checkout 中的本地 git 存储库

git - git rebase 在哪里修改

git push 与远程标签同名的本地分支

android - 使用 JitPack 在 Gradle 中加载库

git - 是否可以在另一个分支中将更改推送到主分支