FreeKB - Git (Version Control) git fetch command
Git (Version Control) - git fetch command

Before you can pull or fetch files, you'll need to use the git clone command to clone an origin Git repository to a directory on your local PC.

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 to master.

git fetch


Or you can include origin master.

git fetch origin master


The git branch command can be used to display the name of your branch. By default, your branch will be named master.

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.

Already up-to-date.


The -q or --quiet option can be used to suppress output.

git fetch --quiet


Add a Comment

We will never share your name or email with anyone. Enter your email if you would like to be notified when we respond to your comment.

Please enter f9685 in the box below so that we can be sure you are a human.


Web design by yours truely - me, myself, and I   |   |