配置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



相关文章
相关标签/搜索