What is difference between "git pull" and "git fetch" in Git?
Hello, I just switch from SVN to Git. I only know a little about Git with
git pull. And today I know more about
I research on the internet I feel it same with git pull. So what is the difference between
git pull and
I only know
git pull helps me get all new code from the current branch I'm working for.
Now I really don't know when I should use
git pull or
Thank you many for any clear explanation!!!
PTJ312 Nov 13 2021
git fetchis the command that tells your local git to retrieve the latest data info from the original branch, ONLY see have any new commit from original not update that to local git.
git pullon the other hand does that AND brings (copy) those changes from the remote repository and APPLY all that new change to local git.
אופק סדלובסקי Nov 13 2021
git pullcommand is used to fetch and download content from a remote repository and immediately update the local repository to match that content.
git fetchcommand will downloads commits, files, and refs from a remote repository into your local repo but not update immediately.