如何克隆一个 github 项目以在本地运行?

我正在尝试遵循这个 Railscast 教程的 authlogic-和它指向源 给你-

我已经安装了 git ——我如何将源代码复制到我的本地主机上,以便我可以像在屏幕播放中那样学习本教程?

122037 次浏览
git clone git://github.com/ryanb/railscasts-episodes.git

To clone a repository and place it in a specified directory use "git clone [url] [directory]". For example

git clone https://github.com/ryanb/railscasts-episodes.git Rails

will create a directory named "Rails" and place it in the new directory. Click here for more information.

You clone a repository with git clone [url]. Like so,

$ git clone https://github.com/libgit2/libgit2

I use @Thiho answer but i get this error:

'git' is not recognized as an internal or external command

For solving that i use this steps:

I add the following paths to PATH:

  • C:\Program Files\Git\bin\

  • C:\Program Files\Git\cmd\

In windows 7:

  1. Right-click "Computer" on the Desktop or Start Menu.
  2. Select "Properties".
  3. On the very far left, click the "Advanced system settings" link.
  4. Click the "Environment Variables" button at the bottom.
  5. Double-click the "Path" entry under "System variables".
  6. At the end of "Variable value", insert a ; if there is not already one, and then C:\Program Files\Git\bin\;C:\Program Files\Git\cmd. Do not put a space between ; and the entry.

Finally close and re-open your console.