
Posted on: 9 months ago
How to clone a git repository without project folder?
Clone, Directory, Git, Repository
56 | 0 | 1
To clone a repository into our current working directory without project folder, we can use the following command:
$ git init .
Syntax:
$ git remote add origin <repository-url>
Example:
$ git remote add origin git@github.com:username/repo.git
$ git fetch origin
$ git checkout master
Cloning project repository into an existing empty directory
$ git clone <repository-url> <existing-directory-path>
Cloning project repository into the current working directory
$ git clone <repository-url> .
Welcome to CodePits.
CodePits provide a collection of tutorials about many programming languages like PHP, Laravel Framework, Codeigniter Framework, Mysql Database, Bootstrap Front-end Framework, Jquery, Node JS, Ajax Example, APIs, CURL Example, Composer Packages Example, AngularJS, Ionic Framework, etc. 🙌
Other Posts
Categories
Tags
Comment
Comments (0)
🤔
No comments yet, be the first to help
load more