0

我已经分叉了一个存储库,然后尝试克隆它

$ git clone https://github.com/dax/newly_cloned_project.git

克隆成功:

Cloning into '[newly_cloned_project]'...
remote: Counting objects: 180, done.
remote: Compressing objects: 100% (143/143), done.
remote: Total 180 (delta 57), reused 144 (delta 21)
Receiving objects: 100% (180/180), 206.54 KiB | 268 KiB/s, done.
Resolving deltas: 100% (57/57), done.

但是当将目录更改为 时newly_cloned_project,我会收到这样的问候:

You are using '.rvmrc', it requires trusting, it is slower and it is not compatible with other ruby managers,
you can switch to '.ruby-version' using 'rvm rvmrc to [.]ruby-version'
or ignore this warning with 'rvm rvmrc warning ignore /Users/charliekim/programming/developer application tasks/connect_four/.rvmrc',
'.rvmrc' will continue to be the default project file in RVM 1 and RVM 2,
to ignore the warning for all files run 'rvm rvmrc warning ignore all.rvmrcs'.

我正在.rvmrc为其他项目使用一个文件 - 但这是新创建的,没有这样的文件 - 经过仔细检查,结果发现我的newly_cloned_project目录中有相当多的文件 - 包括一个.rspec文件和随附的spec目录......

我环顾了 SO 和 Google,但没有看到任何关于此的参考 - 我已经三重检查了我的克隆过程,所以那里没问题(我能说出来?)真的不知道发生了什么!

4

1 回答 1

0

愚蠢的错误 - 如果其他人遇到这样的麻烦,请务必检查您是否没有对用户级gitconfig文件进行不必要的更改(在~/.gitconfigunix 系统上找到)。

我在此文件中为特定存储库添加了一个远程,这导致了问题。

~/.gitconfig

[remote "origin"]
    url = [email_address]:dax/other_repo.git
    fetch = +refs/heads/*:refs/remotes/origin/*

应该在.../other_repo/.git/config

于 2013-11-13T10:32:02.243 回答