git 제출 시간 오류: Updates were rejected because the tip of your current branch is behind...솔루션

1087 단어 Git

오류 보고:
To https://github.com/GaoJingsi/shiro-permission-management-system.git          
 ! [rejected]        master -> master (non-fast-forward)                        
error: failed to push some refs to 'https://github.com/GaoJingsi/shiro-permissio
n-management-system.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.      

원인:
원격 창고에readme가 있습니다.md, 현지에는 없습니다.
솔루션 1:
git pull --rebase origin master
git push -u origin master                                                     

  git pull --rebase origin master readme.md。
솔루션 2:
git push -u origin master -f

gitpush-uorigin master-f는 강제 전송을 의미합니다.

좋은 웹페이지 즐겨찾기