+1 vote
1 view
in Devops and Agile by (20k points)
edited by

Executing the command git clone [email protected]:whatever creates a directory in my current folder named whatever, and drops the contents of the Git repository 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 repository, 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?

1 Answer

0 votes
by (28.4k points)

If the folder is empty, then:

git clone [email protected]:whatever .


git init

git remote add origin PATH/TO/REPO

git fetch

git checkout -t origin/master

Welcome to Intellipaat Community. Get your technical queries answered by top developers !