The git clone command clones a repository from the source Git repo (typically called "origin") to a directory on your PC. For example, the foo.git and bar.git repositories could be cloned.
This could be done via SSH, like this.
git clone ssh://firstname.lastname@example.org/path/to/foo.git
Or via HTTPS.
git clone https://www.example.com/foo.git
By default, the git clone command will clone the repository into your present working directory. A target directory can be included, like this. Be aware that the target directory must not already exist, as the target directory will be created as part of the cloning.
git clone https://www.example.com/foo.git /path/to/directory
if the repository is empty, something like this should be displayed.
Initialized empty Git repository in /path/to/directory/.git/ warning: You appear to have cloned an empty repository.
If the clone is successful, something like this should be displayed.
Initialized empty Git repository in /path/to/directory/.git/ remote: Enumerating objects: 90, done. remote: Counting objects: 100% (90/90), done. remote: Compressing objects: 100% (80/80), done. remote: Total 90 (delta 29), reused 0 (delta 0) Receiving objects: 100% (90/90), 131.06 KiB, done. Resolving deltas: 100% (29/29), done.
Likewise, the git remote command with the -v or --verbose flag can be used to display the URL of the source Git repo (typically called "origin"). Something like this should be displayed.
cd /path/to/directory git remote --verbose . . . origin ssh://email@example.com:7999/path/to/foo.git (fetch) origin ssh://firstname.lastname@example.org:7999/path/to/bar.git (push)
After cloning a repository, by default, you will have a branch called "master" on your PC.
The git branch command with the --all flag can be used to show the branches.
git branch --all
Which will return something like this. The wildcard character is used to identify the branch you are currently using (master in this example)