Let's say you've cloned a repository named foo.git to a directory on your local PC using the git clone command.
git clone ssh://firstname.lastname@example.org/path/to/foo.git
Both the git pull and git fetch commands downloads files from the origin Git repository to your branch (e.g. the directory on your local PC that contains the cloned origin repository). The git checkout command can be used to download one or more files.
If your branch already contains a file that is also in the origin Git repository, and there are differences between the files, git pull will attempt to integrate and merge the differences into the files in your branch.
git fetch will download but not merge or integrate any differences between similar files
The git pull command without any options will pull files from the origin repository.
The git remote command with the -v or --verbose flag can be used to display the URL of origin.
git remote --verbose . . . origin ssh://email@example.com:7999/path/to/example.git (fetch) origin ssh://firstname.lastname@example.org:7999/path/to/example.git (push)
The git branch command with the -a or -all flag can be used to display all of the branches in the repository.
git branch --all
Which will return something like this.
* master remotes/origin/HEAD remotes/origin/feat/logging remotes/origin/master
Or you can include origin followed by the name of a branch you want to pull from, such as master.
git pull origin master
Or some other branch, such as feat/logging.
git pull origin feat/logging
The prior command will return "Already up-to-date" if your the files in your branch are the same revision as the files in the origin Git repository.
The -q or --quiet option can be used to suppress output.
git pull --quiet