What is the difference between ‘git pull’ and ‘git fetch’?
Explanation
The difference between ‘git pull’ and ‘git fetch’ are as follows:
- ‘git pull’: If we use to pull, at that time git will automatically merge. Also, it is context-sensitive. So at that time git will automatically merge with the file that we are currently working on. With the commit on the file. So as it automatically commit it will not be get reviewed by you. So must be aware if you are using this. So you have to be careful while using and managing it.
- ‘git fetch’: If you use fetch, at that time git will gather the commit. This will be to the branch that we target. And this target branch should not be in the current branch. So that it will store that in your local disk. But one thing that is to be understood here is that it will not merge. So this will be very useful if you want your file to be in a proper format and in proper order.
Also read, what is the minimum number of keys that can store in the B-tree?