4

FYI I am running MAMP on OSX. The remote repo is fine. I have cleared out the .git folder and .gitignore file from my local directory however as I was having problems with it. Here is the problem I currently face:

  1. If I do git init in my local folder, then later add the pointer to the original master, it will not synch up - takes for ever and just hangs.

  2. If I do git clone https://me@bitbucket.org/myrepo.git then it creates the git repo in a subfolder of the same name - not what I want.

  3. If I do git clone https://me@bitbucket.org/myrepo.git in the parent folder (above myrepo) then it tells me it can't because destination path 'myrepo' already exists and is not empty.

How do I use git to say "hey, rebuild the .git and .gitignore file into THIS FOLDER, and let's start over again?

Nevik Rehnel
  • 45,305
  • 6
  • 59
  • 49
Samuel Fullman
  • 1,202
  • 1
  • 14
  • 20
  • possible duplicate of [Github clone contents of a repo (without folder itself)](http://stackoverflow.com/questions/6224626/github-clone-contents-of-a-repo-without-folder-itself) – Nevik Rehnel Jun 24 '14 at 05:37

1 Answers1

7

Try this:

git clone https://me@bitbucket.org/myrepo.git .

note the trailing ..

Chris
  • 112,704
  • 77
  • 249
  • 231