70

I want to download this open source application, and they are using Git. What do I need to download the code base?

Update How do I change the working directory when I am using 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.

cjm
  • 61,471
  • 9
  • 126
  • 175
public static
  • 12,702
  • 26
  • 66
  • 86
  • 10
    Please do not update your question to include a second question. If you have a new question, post a new question. That’s how Stack Overflow is meant to work. – Aristotle Pagaltzis Sep 21 '08 at 17:08
  • 2
    "I want to download this open source application, and they are using Git. What do I need to download the code base?" -- half a night spare time. Damn :( – mlvljr Aug 26 '12 at 22:19

4 Answers4

98

Download Git on Msys. Then:

git clone git://project.url.here
Greg Hewgill
  • 951,095
  • 183
  • 1,149
  • 1,285
  • ok that is what I was thinking, just wanted some confirmation thanks. – public static Sep 21 '08 at 03:56
  • 2
    sorry for the question: but where do i write `git clone git://project.url.here` after installing msysgit? – Foyzul Karim Jul 06 '11 at 07:09
  • 3
    @Foysal: Open the "Git bash" icon, which is a Unix-style command prompt on Windows. Then `cd` into your desired directory and run the above command. – Greg Hewgill Jul 06 '11 at 19:22
  • 2
    This is an old question, but as I also found it ...: One thing to note is that `git clone` will download the repository in a *subdirectory* of your current working directory. So you don't create the actual directory yourself but use a parent directory for a number of Git repository. With `git clone git://project.url.here custom-name` you can create a directory with a different name than the original repository name (which is usually not recommendable). – uli_1973 Oct 20 '14 at 07:46
10

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. :)

James Lawruk
  • 30,112
  • 19
  • 130
  • 137
2

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! (:-)

Brent.Longborough
  • 9,567
  • 10
  • 42
  • 62
1

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, e.g. "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".

Michael Johnson
  • 2,287
  • 16
  • 21