git fetch vs git pull in Sourcetree | automateNow

preview_player
Показать описание
Learn git fetch vs git pull using Sourcetree.

What is git fetch?
It is a command in Git which downloads objects and refs (branches/tags) from another repository.

What is git pull?
The git pull command is used to incorporates changes from a remote repository into the current branch.

Git fetch vs git pull:
While git fetch only lets us know about changes made by others to a repository without actually merging those changes into our local branch, git pull actually attempt to merge said changes. In fact, git pull is a combination of two Git commands--git fetch and git merge.

😀 Subscribe for weekly videos! 👍

📑 CHAPTERS

00:00 ~ Intro
00:16 ~ Scenario description
00:47 ~ Making repo changes on GitHub
01:29 ~ Git fetch
02:48 ~ Git pull
03:51 ~ Git fetch vs git pull

👩‍🎓 COURSES

⏯ PLAYLISTS

📫 LET'S CONNECT!

🔗 REFERENCES

Рекомендации по теме
Комментарии
Автор

After watching so many videos, I was able to understand this concept through your video. Thank you.

CodeWithClinton
Автор

suppose i have a local main branch called 'master'. then i create a local branch from that called 'feature-one', and make lots of changes.

if check out 'master' and execute 'git pull', what happens (or what are it's impacts) to my 'feature-one' branch?
if there are conflicts, how can i bring those updates to 'feature-one'?

reclee
Автор

Easy to understand. thank you. I have a question, what if there's number 1 next to push. I have push to the same branch multiple time but the number won't disappear. Do you know why?

nah
Автор

Thanking you.I have one question here.If git pull will do fetch and merge then what is the use of git fetch in real scenario?

rajk