Search notes:

git clone

Clone a repository into a new directory.
Cloning a repository automatically creates a remote named origin.

Shallow clone

Using the --depth option allows to create a shallow clone of a repository where the history is truncated to the specified number of the most recent commits, thus using less bandwith and disk space resources.
$ git clone --depth 1 -b master https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git ~/linux/

warning: You appear to have cloned an empty repository.

git init --quiet --bare repo
Github repository about-git, path: /commands/clone/warning-You-appear-to-have-cloned-an-empty-repository/init-bare.ps1
git clone --quiet file://$pwd/repo repo-cloned
Github repository about-git, path: /commands/clone/warning-You-appear-to-have-cloned-an-empty-repository/clone.ps1
When trying to show an empty repository's history with git log, git will show the message fatal: your current branch 'master' does not have any commits yet.

Include submodules

git clone --recurse-submodules  https://github.com/…
After cloning a repository, its submodules might be required to be «updated»: git submodule --init --force --remote.

See also

After cloning a repository, the URL from which the repository was cloned can (always?, sometimes?) be queried with
git remote get-url origin
4 types of Git URLs
Effects of git clone to the .git/config file.
git switch to a remote branch after cloning a repository.
git commands

Index

Fatal error: Uncaught PDOException: SQLSTATE[HY000]: General error: 8 attempt to write a readonly database in /home/httpd/vhosts/renenyffenegger.ch/php/web-request-database.php:78 Stack trace: #0 /home/httpd/vhosts/renenyffenegger.ch/php/web-request-database.php(78): PDOStatement->execute(Array) #1 /home/httpd/vhosts/renenyffenegger.ch/php/web-request-database.php(30): insert_webrequest_('/notes/developm...', 1758207170, '216.73.216.150', 'Mozilla/5.0 App...', NULL) #2 /home/httpd/vhosts/renenyffenegger.ch/httpsdocs/notes/development/version-control-systems/git/commands/clone/index(80): insert_webrequest() #3 {main} thrown in /home/httpd/vhosts/renenyffenegger.ch/php/web-request-database.php on line 78