40

I think I am stupid. I don't understand how Git works with the command lines so I am using Git Gui.

I got it install and the Gui can be launched successfully, but when I come to clone the file from the files which is shared by another programmer with me, I keep getting this error message,

Location C:/.... already exists.

on the Gui interface, it has two input fields to fill in only -

'Source Location' : https://me@github.com/remote-programmer/project-1.git (for instance)
'Target Directory' : C:/wamp/www/project-1-folder (for instance)

any visual guides available that I can avoid the command lines?

thanks!

Run
  • 54,938
  • 169
  • 450
  • 748
  • Which GUI are you using for git? – snarkyname77 Nov 17 '10 at 14:46
  • I really think you should learn to use git on the commandline, otherwise you're going to be constantly going against the grain and it'll be harder than it needs to be. – Skilldrick Nov 17 '10 at 14:46
  • 2
    I agree with @Skilldrick. Git GUI, in particular, is known for being a terrible interface for git. Invest a little time learning git from the command line (http://progit.org/book/), it's really not very difficult to learn. – bdukes Nov 17 '10 at 14:51
  • 20
    are you kidding - do I have to learn this from the whole book? I just want to clone and push files! :( – Run Nov 17 '10 at 14:56
  • clone and push are chapter two. you can stop reading the book once you know what you need to know. – bdukes Nov 17 '10 at 15:31
  • @lauthiamkok: Are you kidding - do you expect to use a tool without bothering to learn to understand it? – Cascabel Nov 17 '10 at 16:46
  • 1
    managed to clone and push with the gui finally - no need the book for this (do I need to buy a book for how to use a ftp client!?? we don't!)! thanks. – Run Nov 17 '10 at 21:42
  • 4
    For the record, there's no buying involved with the book I linked to, it's available entirely free online. If all that you're using git for is push/pull, then you may not need any more than this, but if you start doing anything more (collaboration, branching, etc), then it definitely helps to understand how the tool is supposed to work, so that you're using it as it's intended, not fighting against it. – bdukes Nov 19 '10 at 14:19

3 Answers3

49

You need to clone into a new directory, that is, that "Target Directory" that you specify should not already exist.

bdukes
  • 152,002
  • 23
  • 148
  • 175
  • 4
    Hi, I still don't get it. I have to create a new directory then clone the files into this directory - am I right? how can I clone if I don't create a directory first? thanks. – Run Nov 17 '10 at 14:54
  • 1
    The clone operation creates the directory. You shouldn't manually create a directory, git will do it for you. – bdukes Nov 17 '10 at 14:56
  • got it! but even though I don't create the directory manually, I just browse location I want to target, I will have the same error... :( – Run Nov 17 '10 at 14:59
  • 23
    So, for me, I put something like `git://github.com/jquery/jquery.git` in the first box, and then put something like `c:\projects\jquery` in the second box, where `projects` exists but `jquery` does not (i.e. I navigate to an existing folder, then manually type the new folder name at the end after I've picked the existing folder). – bdukes Nov 17 '10 at 15:36
  • 7
    Then they shouldn't have the browse solution. Quite frankly, it is stupid. If I browse and point to a directory, just clone there. – squashed.bugaboo Jan 10 '18 at 18:59
  • Run's comment is correct, even if you create an empty directory folder or browse to any location, it will say "directory exists" This seems to be a bug with the browse function. Hemantvc's solution of typing in the folder is the correct workaround for GITGuis' bug. – Ross Youngblood Feb 05 '22 at 00:57
19

'Source Location' : https://me@github.com/remote-programmer/project-1.git (for instance) Don't browse the target directory .write full path and new folder name manually.

'Target Directory' : C:/wamp/www/project-1-folder

Hemantvc
  • 2,111
  • 3
  • 30
  • 42
6

For the following case, just remove the C:/ in the target directory:

'Source Location' : https://me@github.com/remote-programmer/project-1.git
'Target Directory' : C:/wamp/www/project-1-folder (for instance)

The target directory should be like this:

'Target Directory' : wamp/www/project-1-folder
fcdt
  • 2,371
  • 5
  • 14
  • 26
Brendon Dulam
  • 61
  • 1
  • 3