-
Notifications
You must be signed in to change notification settings - Fork 0
git clone to a location
github-actions[bot] edited this page Apr 27, 2026
·
2 revisions
By default, git repositories are cloned into the current directory (usually ~/home). You can specify the intended location for a repository using:
$ git clone <repository-url> <destination-folder>-
If this directory already exists, it must be empty, otherwise you will get an error.
-
If this directory does not exist, creates a new directory at the specific path.
Tip
You can clone a repository's contents into the current directory by using git clone <repo-url> .
Since this clones all content into the current location, it is important to change directories (using cd) into the correct directory first, lest files explode everywhere.
See: cd manpage, git