Book Image

Git Best Practices Guide

By : PIDOUX Eric
Book Image

Git Best Practices Guide

By: PIDOUX Eric

Overview of this book

Table of Contents (12 chapters)

Pulling data from the repository


The other programmers have to pull data to get the new files.

Note

Every time you start working on a project, you have to pull data from the remote repository to maintain and ensure that the code is up to date.

The following command is used to pull data:

Erik@local:~/webproject$ git pull origin master

This command will check and compare your local commit hash to the remote hash. If the remote is the latest, it will try to merge data with the local master branch. This command is the equivalent of executing git fetch (get remote data) and git merge (merge to your branch).

The name of one of our remote repository is origin, and master is the current local branch.