尝试使用 Git bash 添加一个很大的 csv 文件。我已经克隆了存储库,它也存在于我的 git bash 中,并且它以名称 origin
存在。但是我无法将 csv 文件推送到原点。
将 Filename.csv 推送到我的 github 的代码。下面的代码工作正常。
$ git push origin master
$ cd path_of_directory
$ git lfs install
$ git lfs track "*.csv"
$ git add Filename.csv
$ git commit -m "Filename.csv"
$git remote add origin 'https://github.com/Shailaja-Gupta/Marketing-and-Sales-Machine-Learning.git'
$git remote
origin
有问题的代码
$ git push origin master
fatal: Could not read from remote repository.
Please make sure you have the correct access rights
and the repository exists.
用 https 链接替换 origin 会出现以下错误:
$ git push 'https://github.com/Shailaja-Gupta/Marketing-and-Sales-Machine-Learning.git' master
--->ref master:: Error in git rev-list --stdin --objects --not --remotes=https://github.com/Shailaja-Gupta/Marketing-and-Sales-Machine-Learning.git --: exit status 128 fatal: bad object 3cc9272e299e6c7a9cbfe02b36060691f7f86b17
error: failed to push some refs to 'https://github.com/Shailaja-Gupta/Marketing-and-Sales-Machine-Learning.git'
最佳答案
以下步骤对我有用:
$git init
$git add .
$git commit -m 'message'
$git remote add origin 'https://github.com/Shailaja-Gupta/Marketing-and-Sales-Machine-Learning.git'
$ git pull --rebase origin master
$ git push origin master
这对我有用
关于git - 致命 : Could not read from remote repository. Github 错误:无法将某些引用推送到,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/61042354/