github - git push -u origin 一直提示 git pull
PHP中文网
PHP中文网 2017-04-27 09:03:45
0
1
1008

原先已经提交过git,后来把 .git 文件夹删除了。
现在重新提交

  git push -u origin master

一直提交不了!git pull 了很多遍也是一样。


Administrator@PC-20140703LOZL /D/PC/pc_ppgame (master) $ git status n branch master nothing to commit, working directory clean /D/PC/game (master) git push -u origin arning: push.default is unset; its implicit value is changing in Git 2.0 from 'matching' to 'simple'. To squelch this message and maintain the current behavior after the default changes, use: git config --global push.default matching To squelch this message and adopt the new behavior now, use: git config --global push.default simple When push.default is set to 'matching', git will push local branches to the remote branches that already exist with the same name. In Git 2.0, Git will default to the more conservative 'simple' behavior, which only pushes the current branch to the corresponding remote branch that 'git pull' uses to update the current branch. See 'git help config' and search for 'push.default' for further information. (the 'simple' mode was introduced in Git 1.7.11. Use the similar mode 'current' instead of 'simple' if you sometimes use older versions of Git) To git@bitbucket.org:dft/ppgame.git ! [rejected] master -> master (fetch first) error: failed to push some refs to 'git@bitbucket.org:dft/ppgame.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 again. hint: See the 'Note about fast-forwards' in 'git push --help' for details. /D/PC/game (master) git status n branch master nothing to commit, working directory clean /D/PC/game (master) git pull -u origin warning: no common commitsOZL remote: Counting objects: 2190, done. remote: Compressing objects: 100% (1971/1971), done. remote: Total 2190 (delta 184), reused 2171 (delta 175) Receiving objects: 100% (2190/2190), 27.91 MiB | 256.00 KiB/s, done. Resolving deltas: 100% (184/184), done. From bitbucket.org:dft/ppgame * [new branch] master -> origin/master There are no candidates for merging among the refs that you just fetched. /D/PC/game (master) git status n branch master Untracked files: (use "git add <file>..." to include in what will be committed) /D/PC/game (master) git push -u origin master o git@bitbucket.org:dft/ppgame.git ! [rejected] master -> master (non-fast-forward) error: failed to push some refs to 'git@bitbucket.org:dft/ppgame.git' 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. hint: See the 'Note about fast-forwards' in 'git push --help' for details.
PHP中文网
PHP中文网

认证高级PHP讲师

모든 응답(1)
大家讲道理

Updates were rejected because the tip of your current branch is behind팁이 ​​너무 명확하지 않나요? 원격 창고의 지점이 로컬 코드보다 최신이므로 충돌이 있는 경우 충돌을 해결하여 제출하거나 새 지점을 열거나 제출할 수 있습니다. 직접 git push --force (여러 사람과 협업 시 주의해주세요 -.-). git pull이 작동하지 않는 이유는 로컬에서 수정했기 때문에 원격으로 오면 충돌이 발생하기 때문입니다. 여러 사람이 협업할 때는 지점을 개설하는 것이 좋습니다.

최신 다운로드
더>
웹 효과
웹사이트 소스 코드
웹사이트 자료
프론트엔드 템플릿