简体   繁体   English

我无法执行git Checkout-Railstutorial

[英]I can't do git Checkout - Railstutorial

I'm getting this error: 我收到此错误:

Not a git repository (or any parent up to mount parent /Users)
Stopping at filesystem boundary (GIT_DISCOVERY_ACROSS_FILESYSTEM not set).

Before this I was trying to create a user model, but I was getting an error, then I get another where 2 minutes ago I didn't have, so I download the last version of my app from github and started again the chapter. 在此之前,我试图创建用户模型,但遇到错误,然后在2分钟前遇到另一个错误,因此我从github下载了我的应用程序的最新版本,并重新开始了本章。

The first thing was to do a git checkout master , but the error on the top kept showing up. 第一件事是做一个git checkout master ,但是顶部的错误不断出现。 I lost all my cached passwords with a forced reboot, so I thinked "oh probably I just need to do the login on github from the Terminal" but I can't find nothing more than the git config --global user.name "USER_NAME" and the email one, so I tried to configure again github. 我在强制重启后丢失了所有缓存的密码,因此我想“哦,也许我只需要从终端登录github即可”,但除了git config --global user.name "USER_NAME" ”,我什么也找不到git config --global user.name "USER_NAME"和一封电子邮件,因此我尝试再次配置github。

On the github helper, after following the first step I had to do git credential-osxkeychain that gave me all the times this error 在github helper上,在执行了第一步之后,我必须执行git credential-osxkeychain ,这使我一直都git credential-osxkeychain这个错误

error: git-credential-osxkeychain died of signal 11

Basicly I don't know what the hell can I do now... 基本上我不知道该怎么办...

If you haven't cloned a repo, then any git command supposed to work in a git repo (that is, a folder with a .git/ subfolder in it) won't work. 如果您尚未克隆存储库,那么任何应该在git存储库中运行的git命令(即其中包含.git/子文件夹的文件夹)都将无法工作。
This wouldn't be related to credentials at all: it is caused by the absence of a .git folder containing the local repo. 这根本与凭据无关:这是由于缺少包含本地存储库的.git文件夹引起的。

Instead of the GitHub app, you could clone it directly in command line. 您可以直接在命令行中克隆它而不是GitHub应用程序。

"Not a git repository (or any parent up to mount parent /Users) Stopping at filesystem boundary (GIT_DISCOVERY_ACROSS_FILESYSTEM not set)." “不是git存储库(或任何要挂载父级/ Users的父级)在文件系统边界停止(未设置GIT_DISCOVERY_ACROSS_FILESYSTEM)。”

This error message occurs when one attempts to issue certain git commands in a directory that is not currently initialized as a repository. 当有人尝试在当前尚未初始化为存储库的目录中发出某些git命令时,会出现此错误消息。

Git must already be installed on your machine based on this error message, otherwise you'd not have seen it. 根据此错误消息,必须已经在您的机器上安装了Git,否则您将看不到它。 Not certain, but it sounds like when you downloaded your GitHub repository's .zip file, it was striped of the .git subdirectory. 不确定,但是听起来像当您下载GitHub存储库的.zip文件时,它是.git子目录的条带。 When you issue the command git checkout master git looks for the .git subdirectory to, in layman's terms, "find out what to checkout." 发出命令git checkout master git会以通俗易懂的方式查找.git子目录,以“查找要签出的内容”。 Since there is no .git subdir, git doesn't know what to do, and thus the error message. 由于没有.git子目录,因此git不知道该怎么办,因此不知道错误消息。

To correct this, follow the steps here from Github to clone your repository - you may want to do so in an empty directory if you do not want to overwrite the files in the old directory. 为了解决这个问题,请按照下列步骤这里从GitHub仓库克隆为-您可能希望在一个空目录这样做,如果你不希望覆盖在旧目录中的文件。 If you run in to any issues trying to clone, let us know and we can help. 如果您遇到任何尝试克隆的问题,请告诉我们,我们将为您提供帮助。

Once the repository has been cloned, then you can checkout branches, commit changes, etc... 克隆存储库后,即可签出分支机构,提交更改等。

Happy trails! 快乐的足迹!

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM