配置GitHub過程當中遇到的問題

1html

/d/Androi dProj ects/JCamera2Demo (master)  JasonWu@DESKTOP-JASONWU MINGW64  $ git push origin master  fatal: 'origin' does not appear to be a git repository  fatal: Could not read from remote repository.  Please make sure you have the correct access rights  and the repository exists.

 

.git文件夾下的config文件沒有註明origin master的遠程地址,使用以下命令便可解決:git

git remote add origin https://github.com/hfutwj/Camera2Demo.gitgithub

 

 

 

 

2app

/d/Androi dProj ects/JCamera2Demo (master)  JasonWu@DESKTOP-JASONWU MINGW64  $ git push —u origin master  To https://gi Chub.com/hfutwj/Camera2Demo.git  ! C rejected]  master —> master (fetch fi rst)  error  hint:  hint:  hint:  hint:  hint:  : failed to push some refs to 'https://github.com/hfutwj/Camera2Demo.git'  Updates were rej ected because the remote contains work that you do  not have locally. This is usually caused by another repository pushing  to the same ref. You may want to fi rst integrate the remote changes  (e.g., 'g it pull  . ' ) before pushing again.  See the 'Note about fast—forwards' in ' git push  —help' for details.

本地倉的文件不全,須要先同步,能夠參考https://jingyan.baidu.com/article/f3e34a12a25bc8f5ea65354a.htmlfetch

先輸入以下命令合併本地和遠程倉:spa

git pull --rebase origin master3d

<wiz_tmp_tag id="wiz-table-range-border" contenteditable="false" style="display: none;">htm



相關文章
相關標籤/搜索