Search icon CANCEL
Subscription
0
Cart icon
Your Cart (0 item)
Close icon
You have no products in your basket yet
Save more on your purchases now! discount-offer-chevron-icon
Savings automatically calculated. No voucher code required.
Arrow left icon
Explore Products
Best Sellers
New Releases
Books
Videos
Audiobooks
Learning Hub
Conferences
Free Learning
Arrow right icon
Arrow up icon
GO TO TOP
Git Best Practices Guide

You're reading from   Git Best Practices Guide Master the best practices of Git with the help of real-time scenarios to maximize team efficiency and workflow

Arrow left icon
Product type Paperback
Published in Nov 2014
Publisher
ISBN-13 9781783553730
Length 102 pages
Edition 1st Edition
Tools
Arrow right icon
Author (1):
Arrow left icon
PIDOUX Eric PIDOUX Eric
Author Profile Icon PIDOUX Eric
PIDOUX Eric
Arrow right icon
View More author details
Toc

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.

You have been reading a chapter from
Git Best Practices Guide
Published in: Nov 2014
Publisher:
ISBN-13: 9781783553730
Register for a free Packt account to unlock a world of extra content!
A free Packt account unlocks extra newsletters, articles, discounted offers, and much more. Start advancing your knowledge today.
Unlock this book and the full library FREE for 7 days
Get unlimited access to 7000+ expert-authored eBooks and videos courses covering every tech area you can think of
Renews at $19.99/month. Cancel anytime