You will know after using it, git pull = git fetch + git merge The fetch and push commands can fetch and push the remote branch respectively, but pull does not directly talk to the remote branch. The difference between fetch and pull is: git fetch: gets the latest version from the remote to the local, and does not automatically merge And git pull gets the latest version from the remote and merges it into the local warehouse From a security perspective, git fetch is better than git pull It is safer because we can first compare the differences between local and remote and then merge them selectively. git push pushes to master by default. If there are multiple branches, multiple branches will be pushed to the remote together
You will know after using it, git pull = git fetch + git merge
The fetch and push commands can fetch and push the remote branch respectively, but pull does not directly talk to the remote branch.
The difference between fetch and pull is: git fetch: gets the latest version from the remote to the local, and does not automatically merge
And git pull gets the latest version from the remote and merges it into the local warehouse
From a security perspective, git fetch is better than git pull It is safer because we can first compare the differences between local and remote and then merge them selectively.
git push pushes to master by default. If there are multiple branches, multiple branches will be pushed to the remote together
git pull
=git fetch
+git merge
少用
git pull
多用git fetch