I'm trying to use git clone
to download the codes from my webfaction server
$ cd ../webapps/nameofwebapp/
$ git clone [email protected]:github-username/github-repo.git ./
AND there is error :
fatal: destination path '.' already exists and is not an empty directory.
I use ls and there are something under the nameofwebapp
auth git.cgi gitweb.cgi repos static
I want to ask where to use git clone
Do I need to make a new directory??
You might discover that the source files were there before, but were removed in a subsequent commit. If so, just git checkout to an older commit. Also possible that there's simply no files in the master branch ( git log --all will show other branches). See git branch for list and git checkout another branch.
Go to the current directory where you want the cloned directory to be added. To do this, input cd and add your folder location. You can add the folder location by dragging the folder to Git bash. Click on “Clone or download” and copy the URL.
Find the file or folder whose path you'd like to copy in File Explorer. Hold down Shift on your keyboard and right-click on it. In the context menu that pops up, select “Copy As Path.”
To clone git repository into a specific folder, you can use -C <path> parameter, e.g. Although it'll still create a whatever folder on top of it, so to clone the content of the repository into current directory, use the following syntax: cd /httpdocs git clone [email protected]:whatever .
Simply:
git clone [email protected]:github-username/github-repo.git
That will create a new folder github-repo
in ../webapps/nameofwebapp/
.
In your case:
cd ../webapps/nameofwebapp/
git clone [email protected]:github-username/github-repo.git -b develop ./
If you already did the clone:
cd github-repo
git checkout -b develop origin/develop
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With