Git_코드 클라우드 버전 충돌에 업로드

1777 단어 git
클라우드에 올리면 안 돼요.
$ git push test master
To gitee.com:yoyhm/git.git
 ! [rejected]        master -> master (non-fast-forward)
error: failed to push some refs to '[email protected]:yoyhm/git.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.

해결 방법
## 1.  , pull 
$ git pull origin master
##  
## ------------------------
$ git pull test master
From gitee.com:yoyhm/git
 * branch            master     -> FETCH_HEAD
fatal: refusing to merge unrelated histories
## ------------------------------
##  
## ------
$ git merge test/master --allow-unrelated-histories
## ------

## 2.  
$ git push -u test master

push 로컬 코드를github로 바꾸는 것을 참고하는 중 오류가 발생했습니다.

좋은 웹페이지 즐겨찾기