In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-02-24 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Internet Technology >
Share
Shulou(Shulou.com)06/01 Report--
Most people don't understand the knowledge points of this article "What are the differences between pull and fetch in git", so Xiaobian summarizes the following contents for everyone. The contents are detailed, the steps are clear, and they have certain reference value. I hope everyone can gain something after reading this article. Let's take a look at this article "What are the differences between pull and fetch in git".
Difference: 1. fetch can directly change the remote tracking branch, while pull cannot directly operate on the remote tracking branch;2. fetch pulls data to the local repository without automatically merging or modifying the current work, pull is to obtain the latest version from the remote and merge it to the local, and will automatically merge or modify the current work.
Operating environment: Windows 10 system, Git version 2.30.0, Dell G3 computer.
What is the difference between pull and fetch in git?
Git fetch and git pull differ in that they have different remote trace branches, different pull, and different commitIDs.
1. Remote tracking branches are different
Git fetch: Git fetch can directly change the remote trace branch.
git pull: git pull cannot directly operate on remote trace branches, we must first switch back to the local branch and then create a new commit.
Second, pull different
Git fetch: Git fetch pulls data to the local repository-it doesn't automatically merge or modify current work.
git pull: git pull is to get the latest version from remote and merge it locally, which will automatically merge or modify the current work.
III. Different commitIDs
1. Git fetch: Use Git fetch to update the code. The commitID of master in the local library remains unchanged, or is equal to 1.
2. git pull: Use git pull to update the code. The commitID of master in the local library changes to 2.
The above is the content of this article about "what is the difference between pull and fetch in git". I believe everyone has a certain understanding. I hope the content shared by Xiaobian will help everyone. If you want to know more relevant knowledge, please pay attention to the industry information channel.
Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.
Views: 0
*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
"Every 5-10 years, there's a rare product, a really special, very unusual product that's the most un
© 2024 shulou.com SLNews company. All rights reserved.