简体   繁体   中英

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. What do I need to download the code base?

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.

Download Git on Msys . Then:

git clone git://project.url.here

Install mysysgit . (Same as Greg Hewgill's answer.)

Install Tortoisegit . (Tortoisegit requires mysysgit or something similiar like Cygwin.)

After TortoiseGit is installed, right-click on a folder, select Git Clone..., then enter the Url of the repository, then click Ok.

This answer is not any better than just installing mysysgit, but you can avoid the dreaded command line. :)

I don't want to start a "What's the best unix command line under Windows" war, but have you thought of Cygwin ? Git is in the Cygwin package repository.

And you get a lot of beneficial side-effects! (:-)

To change working directory in GitMSYS's Git Bash you can just use cd

cd /path/do/directory

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 ".
  • 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.

Also, you can right click in Windows Explorer on a directory and "Git Bash here".

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

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