Skip to content
BENIBIX Learn

Git Pull

Development🔀 Version ControlRemotes

Also known as Pull

The team's new commits come down from the remote into your branch.

Think of it like

Think of it like collecting your post and opening it at once. The new news is now on your desk.

Example

Jack pulls first thing every morning. His copy then has everything Emma pushed the night before.

Why it matters

Pulling keeps you working on the latest code. The longer you wait, the bigger the merge.

Definition

To pull is to bring new commits from a remote into your own branch. It is a fetch followed by a merge, done in one step. After a pull, your files match what the team has pushed. If you and someone else changed the same lines, you get a merge conflict to fix. Pulling often keeps those conflicts small.

Example code

console
$ git pull
Updating 68ba79c..643e9b2
Fast-forward
 about.html | 1 +
Emma's new about page lands in Jack's files.

Common mistake

Pulling with half-done changes in your files. Commit or stash them first, or the pull may stop.

Key takeaways

  1. 1
    Fetch plus merge. Two steps done as one.
  2. 2
    Changes your files. Your branch catches up.
  3. 3
    Pull often. Small merges are easy merges.

Compare

Learn it properly