David Smith David Smith - 1 year ago 179
Git Question

How do you clone a git repository into a specific folder?

Executing the command

git clone git@github.com:whatever
creates a directory in my current folder named whatever, and drops the contents of the git repo into that folder:


My problem is that I need the contents of the git repository cloned into my current directory so that they appear in the proper location for the web server:


I know how to move the files after I've cloned the repo, but this seems to break git, and I'd like to be able to update just by calling
git pull
. How can I do this?

Answer Source

Option A:

git clone git@github.com:whatever folder-name

Option B:

move the .git folder, too.

Better yet:

Keep your working copy somewhere else, and create a symbolic link.

Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download