From the course: Complete Guide to Git

Unlock the full course today

Join today to access over 24,900 courses taught by industry experts.

Fetch changes from a remote

Fetch changes from a remote - Git Tutorial

From the course: Complete Guide to Git

Fetch changes from a remote

- In this movie, we will learn how to fetch changes from the remote repository. The Git command we'll use is Git Fetch, followed by the name of the remote. For us, that'll be Git Fetch Origin. And if we don't specify the remote, then Origin is the default unless a different upstream remote is configured. So we can just use Git Fetch Fetch will retrieve all branches and the commits that go with them, and it will update all remote tracking branches so that they point to the correct commits. We could fetch changes from our big Star collectibles directory, but we know that it already has everything that's contained on the remote. Instead, let's use this cloned version of the repository, which I've called lynda_version. We'll use this repository throughout this chapter to simulate what it's like working with a collaborator. These directories are two separate Git repositories. Normally there's not a reason to have a duplicate of a repository, but let's pretend that this directory is on a…

Contents