What is the distinction between "git pull" and "git fetch"?

1.2K    Asked by UnaManning in Python , Asked on Jan 8, 2020
Answered by Una Manning

In the easiest terms, git pull does a git fetch followed by a git merge.

At the point when you use to pull, Git attempts to consequently do your work for you. It is setting delicate, so Git will combine any pulled submits into the branch you are right now working in. pull naturally consolidates the submits without letting you survey them first. On the off chance that you don't intently deal with your branches, you may run into visit clashes.

At the point when you fetch, Git accumulates any submits from the objective branch that doesn't exist in your present branch and stores them in your nearby archive. Be that as it may, it doesn't blend them with your present branch. This is especially helpful on the off chance that you have to stay up with the latest, however, are chipping away at something that may break if you update your records. To coordinate the submits into your master branch, you use merge.



Your Answer

Interviews

Parent Categories