解决git pull,报fatal: No remote repository specified. Please......

简介: 在将本地项目传到GitHub上去的时候~/Aliyun/alioss-file on  master ⌚ 16:27:53$ git pullfatal: No remote repository specified.

在将本地项目传到GitHub上去的时候

~/Aliyun/alioss-file onmaster16:27:53
$ git pull
fatal: No remote repository specified.  Please, specify either a URL or a
remote name from which new revisions should be fetched.

这个时候,需要编辑项目下的.git文件夹中

~/Aliyun/alioss-file onmaster16:41:37
$ cd .git

~/Aliyun/alioss-file/.git onmaster16:55:24
$ ls
COMMIT_EDITMSG ORIG_HEAD      description    info           refs
FETCH_HEAD     branches       hooks          logs
HEAD           config         index          objects

~/Aliyun/alioss-file/.git onmaster16:55:54
$ 

编辑vi config

[core]

        repositoryformatversion = 0

        filemode = true

        bare = false

        logallrefupdates = true

        ignorecase = true

        precomposeunicode = false

[remote "origin"]
        fetch = +refs/heads/*:refs/remotes/origin/*
        url = https://github.com/xiongben-tongxue/alioss-file.git
        pushurl= https://github.com/xiongben-tongxue/alioss-file.git
[branch "master"]
        remote = origin
        merge = refs/heads/master

将下面这两项换成你自己的

url = https://github.com/xiongben-tongxue/alioss-file.git
pushurl= https://github.com/xiongben-tongxue/alioss-file.git

保存后就搞定了。

目录
相关文章
|
3天前
|
开发工具 git
git fetch和 pull的区别
`git fetch`和 `git pull`在Git中扮演着不同的角色,了解它们的区别和使用场景对于高效管理代码库至关重要。通过合理使用这两个命令,可以更好地控制代码合并过程,减少冲突,提高团队协作效率。
130 97
|
4月前
|
开发工具 git C++
【App Service】VS Code直接部署App Service时候遇见 “fatal: not a git repository (or any of the parent directories): .git”
通过VS Code发布Python App Service的时候,遇见了发布失败错误: The deployment failed with error: fatal: not a git repository (or any of the parent directories): .git . Please take a few minutes to help us improve the deployment experience
110 24
|
2天前
|
开发工具 git
git fetch和 pull的区别
通过这些内容和示例,您可以系统地理解 `git fetch`和 `git pull`的区别,并在实际工作中灵活应用这两个命令,提高版本控制的效率。希望这些内容对您的学习和工作有所帮助。
33 24
|
8天前
|
开发工具 git
git 使用之remote: File [4e21e71a555febaa4dfaaa05cf7eeb606ea96ae2] size 104.090MB, exceeds quota 100MB remote: Please remove the file[s] from history and try again 报错如何解决-优雅草卓伊凡
git 使用之remote: File [4e21e71a555febaa4dfaaa05cf7eeb606ea96ae2] size 104.090MB, exceeds quota 100MB remote: Please remove the file[s] from history and try again 报错如何解决-优雅草卓伊凡
25 3
git 使用之remote: File [4e21e71a555febaa4dfaaa05cf7eeb606ea96ae2] size 104.090MB, exceeds quota 100MB remote: Please remove the file[s] from history and try again 报错如何解决-优雅草卓伊凡
|
9天前
|
安全 开发工具 git
git分布式版本控制系统及在码云上创建项目并pull和push
通过本文的介绍,我们详细讲解了Git的基本概念和工作流程,并展示了如何在码云上创建项目及进行pull和push操作。Git作为一种分布式版本控制系统,为开发者提供了强大的工具来管理代码变更和协作开发。希望本文能帮助您更好地理解和使用Git及码云,提高开发效率和代码质量。
37 18
|
8天前
|
安全 开发工具 git
git分布式版本控制系统及在码云上创建项目并pull和push
通过本文的介绍,我们详细讲解了Git的基本概念和工作流程,并展示了如何在码云上创建项目及进行pull和push操作。Git作为一种分布式版本控制系统,为开发者提供了强大的工具来管理代码变更和协作开发。希望本文能帮助您更好地理解和使用Git及码云,提高开发效率和代码质量。
29 16
|
3月前
|
网络安全 开发工具 git
解决fatal:remote error:You can’t push to git://github.com/username/*.g
通过上述诊断与修复步骤,绝大多数的推送错误都能得到有效解决,确保您的Git工作流顺畅无阻。
299 1
|
5月前
|
开发工具 git
深入理解Git中的git pull和git fetch命令
深入理解Git中的git pull和git fetch命令
299 0
|
5月前
|
Shell 网络安全 开发工具
fatal: unable to access 'https://github.com/wolfcw/libfaketime.git/': Encountered end of file
fatal: unable to access 'https://github.com/wolfcw/libfaketime.git/': Encountered end of file
|
9月前
|
开发工具 git
git pull之后出现REBASE(1/1)
git pull之后出现REBASE(1/1)
482 3