Git Pull : This command is used to bring all the changes from the remote repository to the current branch in your local machine.
Git Fetch : In simple words, it downloads the objects and references from another repository. Git Fetch can fetch the changes from single repository or more than one repository.
Git Merge : This git command joins more than one development histories together. In simple words this command makes your local repository in sync with your remote repository.
So now, the difference between Git Pull and Git Fetch is that git pull automatically merges the commits into the branch you're in when you make the request whereas git fetch does not merges the commits to the current branch, it just creates a local copy of a remote branch.
So in simple words we can say that git pull does a git fetch and then git merge. Git Pull is high level command of git fetch and git merge. You can use any one of those, both are same.
Please Like and Share the Blog, if you find it interesting and helpful.
- Integrate Colorbox in Asp Net Web Application
- How to Integrate CKEditor in Asp Net Web Application
- Create sub repository inside a repository in Git
- Fatal : The remote end hung up unexpectedly
- Rename local Git branch
- Delete git branch
- Edit incorrect commit message in Git
- Run ssh authentication agent
- Create .ssh directory
- Fatal : Not a git repository