简体   繁体   English

要下载一个Git仓库,我需要什么(Windows机器)?

[英]Want to download a Git repository, what do I need (windows machine)?

I want to download this open source application, and they are using Git. 我想下载这个开源应用程序,他们正在使用Git。 What do I need to download the code base? 我需要什么来下载代码库?

Update How do I change the working directory when I am using Git Bash? 更新当我使用Git Bash时如何更改工作目录? (I want to download the repo at a certain directory, using pwd tells me I will be downloading the repo where I don't want it. (我想在某个目录下下载仓库,使用pwd告诉我,我将在不需要的地方下载仓库。

Download Git on Msys . 在Msys上下载Git Then: 然后:

git clone git://project.url.here

Install mysysgit . 安装mysysgit (Same as Greg Hewgill's answer.) (与Greg Hewgill的答案相同。)

Install Tortoisegit . 安装Tortoisegit (Tortoisegit requires mysysgit or something similiar like Cygwin.) (Tortoisegit需要mysysgit或类似Cygwin之类的东西。)

After TortoiseGit is installed, right-click on a folder, select Git Clone..., then enter the Url of the repository, then click Ok. 安装TortoiseGit后,右键单击一个文件夹,选择Git Clone ...,然后输入存储库的Url,然后单击“确定”。

This answer is not any better than just installing mysysgit, but you can avoid the dreaded command line. 这个答案不仅比安装mysysgit好,而且可以避免令人恐惧的命令行。 :) :)

I don't want to start a "What's the best unix command line under Windows" war, but have you thought of Cygwin ? 我不想发动“ Windows下最好的Unix命令行是什么”之战,但是您想到Cygwin吗? Git is in the Cygwin package repository. Git在Cygwin软件包存储库中。

And you get a lot of beneficial side-effects! 而且您会得到很多有益的副作用! (:-) (:-)

To change working directory in GitMSYS's Git Bash you can just use cd 要在GitMSYS的Git Bash中更改工作目录,您可以使用cd

cd /path/do/directory cd / path / do /目录

Note that: 注意:

  • Directory separators use the forward-slash ( / ) instead of backslash. 目录分隔符使用正斜杠( / )而不是反斜杠。
  • Drives are specified with a lower case letter and no colon, eg " C:\\stuff " should be represented with " /c/stuff ". 驱动器用小写字母指定,没有冒号,例如,“ C:\\stuff ”应用“ /c/stuff ”表示。
  • Spaces can be escaped with a backslash ( \\ ) 可以使用反斜杠( \\ )来转义空格
  • Command line completion is your friend. 命令行完成是您的朋友。 Press TAB at anytime to expand stuff, including Git options, branches, tags, and directories. 随时按TAB键可以扩展内容,包括Git选项,分支,标签和目录。

Also, you can right click in Windows Explorer on a directory and "Git Bash here". 另外,您可以在Windows资源管理器中的目录上单击鼠标右键,然后单击“此处的Git Bash”。

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

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