git分别手动创建本地仓库和远程仓库默认master分支无法使用其他分支可以使用不能pull也不能push
git 控制台错误信息
13:50:48.820: [practices] git -c credential.helper= -c core.quotepath=false -c log.showSignature=false push --progress --porcelain origin refs/heads/master:master --set-upstream
To "仓库地址"
! refs/heads/master:refs/heads/master [rejected] (fetch first)
Done
error: failed to push some refs to "仓库地址"
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.
Event log提示:
13:55 Can't update
master has no tracked branch
Choose upstream branch (show balloon)
13:55 Update canceled
解决办法:
项目.git文件夹同级目录 右键打开git bash here命令工具
先pull一次并且附带允许不相关的历史记录名义
$ git pull origin master --allow-unrelated-histories