What is the main difference between git fetch and git pull?

  • git fetch only downloads changes, git pull downloads changes and updates the local branch
  • git fetch updates the local branch, git pull only downloads changes
  • Both commands are the same
  • git fetch is used for remote repositories, git pull is used for local repositories
The correct option is A. git fetch only downloads changes from the remote repository but does not automatically update the local branch. On the other hand, git pull downloads changes and updates the local branch.
Add your answer
Loading...

Leave a comment

Your email address will not be published. Required fields are marked *