Help the world stop coronavirus! Stay home!

Prev Next

Maven / GIT Interview Questions

Difference between git fetch and git pull.

git fetch imports commits from a remote repository into your local repo. If you want to reflect these changes in your target branch, git fetch must be followed with a git merge. Since fetched content is represented as a remote branch, it has absolutely no effect on your local development work. This makes fetching a safe way to review commits before integrating them with your local repository. Your target branch will only be updated after merging the target branch and fetched branch.

git pull does a git fetch followed by a git merge. 'git pull' downloads as well as merges the data from a remote repository into your local working files. It may also lead to merge conflicts if your local changes are not yet committed.

git pull = git fetch + git merge

❤Cash Back At Stores you Love !!!❤

Earn your $10 reward when you make your first purchase through Ebates by signing up with clicking below button.

Ebates Coupons and Cash Back

More Related questions...

Show more question and Answers...


Comments & Discussions