我在分支中创建了一个文件,将其 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/