0
0
Gitdevops~5 mins

Fetch vs pull difference in Git - Quick Revision & Key Differences

Choose your learning style9 modes available
Recall & Review
beginner
What does git fetch do?

git fetch downloads new data from a remote repository but does not change your working files. It updates your local copy of the remote branches.

Click to reveal answer
beginner
What does git pull do?

git pull downloads new data from a remote repository and immediately merges it into your current working branch, updating your files.

Click to reveal answer
intermediate
How is git pull related to git fetch?

git pull is like running git fetch followed by git merge. It fetches changes and then merges them automatically.

Click to reveal answer
intermediate
Why might you use git fetch instead of git pull?

You use git fetch when you want to see changes from others without changing your current files. It lets you review updates before merging.

Click to reveal answer
intermediate
What happens if there are conflicts during a git pull?

If there are conflicts, git pull will pause and ask you to fix the conflicts manually before completing the merge.

Click to reveal answer
What does git fetch do?
ACreates a new branch
BDownloads and merges changes automatically
CDownloads changes but does not update working files
DDeletes local branches
Which command updates your current branch with remote changes immediately?
Agit pull
Bgit fetch
Cgit clone
Dgit status
What is the sequence of commands that git pull performs internally?
Agit fetch then git merge
Bgit merge then git fetch
Cgit commit then git push
Dgit clone then git checkout
Why might you prefer git fetch over git pull?
ATo automatically merge changes
BTo push local changes
CTo delete remote branches
DTo review changes before merging
What must you do if git pull results in conflicts?
AIgnore and continue
BFix conflicts manually before completing merge
CRun <code>git push</code> immediately
DDelete your local branch
Explain the difference between git fetch and git pull in your own words.
Think about what happens to your files after each command.
You got /4 concepts.
    Describe a situation where using git fetch is better than git pull.
    Consider when you want to be cautious before changing your files.
    You got /3 concepts.