Git Pull Vs Fetch | Git Tutorial For Beginners

git tutorial for beginner

Git Pull Vs Fetch | Git Tutorial For Beginners

This article will explain you the basic difference between git pull and git fetch. Let’s get started.

Git Fetch: 

When you are using the git fetch command, All of the changes or updates in your remote will be downloaded to your local working areas but it will not affect your current code base. For example, suppose you are working on a branch name ui-development and you want to fetch a updated change from your remote repository but don’t wants to affect your current branch working files, Then you will apply the command git fetch.  Git fetch only downloads new data from a remote repository but it doesn’t integrate any of this new data into your working files.

Git Pull: 

Using the git pull command, All of the changes or updates in your remote will be downloads to your local current working branch and it will update your working files as well. In short, To update your current HEAD branch with the latest changes from the remote server, you will use the command git pull.

 

Hope this simple explanation  about git pull vs fetch will help you to understand the flow of git. You can learn more about git like git commit, git delete branch, git clone repository in our blog.

 

Nahidur Rahman Rifath

Passionate Software Engineer, Content Writer, Reader

21 Comments

Leave a Reply

Your email address will not be published. Required fields are marked *