Rajanikant Hawaldar
What is the difference between 'git pull' and 'git fetch'?

What is the difference between ‘git pull’ and ‘git fetch’?

By Rajanikant Hawaldar in Tools on Sep 30 2020
  • Kiran Mohanty
    Oct, 2020 5

    git fetch will fetch changes from remote/main branch to your local branch but changes will not reflect on your local project / workspace. Whereas git pull will fetch changes from remote / main repository to local branch as well as local project / workspace.

    • 2
  • Shravankumar Prajapati
    Jan, 2021 17

    git fetch : It fetch changes but don't update local file with new change. git pull: It pull changes and update local file with changes.

    • 0
  • Naveen Kumar
    Oct, 2020 22

    git pull does a git fetch followed by a git merge.

    When you use pull, Git tries to automatically do your work for you. It is context sensitive, so Git will merge any pulled commits into the branch you are currently working in.

    When you fetch, Git gathers any commits from the target branch that do not exist in your current branch and stores them in your local repository. However, it does not merge them with your current branch.

    • 0


Most Popular Job Functions


MOST LIKED QUESTIONS