Chapter 6. Remote Collaboration

Pull vs. Fetch

Pull vs. Fetch
Tag:

This page compares Pull with Fetch.

The key difference between Pull (the git pull command) and Fetch (the git fetch command) is whether the command executes the merge action or not.

Both commands download commits and files from a Remote Repository under remote-tracking branches (the Remote Repository information). The pull command seamlessly triggers the merge action for the designated branch, while the fetch command doesn't initiate the merge action.

Typically, the pull command is used for the efficiency of operations. For a simple operation, you can use the pull command. However, generally, it is safer to use the git fetch command and check the Remote Repository status first before executing the git merge command.

This page compares Pull with Fetch.

The key difference between Pull (the git pull command) and Fetch (the git fetch command) is whether the command executes the merge action or not.

Both commands download commits and files from a Remote Repository under remote-tracking branches (the Remote Repository information). The pull command seamlessly triggers the merge action for the designated branch, while the fetch command doesn't initiate the merge action.

Typically, the pull command is used for the efficiency of operations. For a simple operation, you can use the pull command. However, generally, it is safer to use the git fetch command and check the Remote Repository status first before executing the git merge command.

Tag: