Essential Git for Scientists
  • Introduction
  • Basic Concepts
    • Version Control
    • Git
    • Repo
    • Commits
    • Branches
    • Remotes
    • GitHub
    • De-centralisation
    • Summary
  • Basic Operations
    • Install Git
    • Create a Repo
    • Make a Commit
    • Inspect a Previous Commit
    • Revert a Change
    • Make a Branch
    • Extend a Branch
    • Fast-forward merge
    • Resolve conflicts
  • Intermediate Concepts
    • Commits
    • Three Trees
    • Rebase
    • Fetch
    • Pull
    • Push
  • Advanced Concepts
    • Reset
    • Interactive rebase
    • Formatted patches
    • Blame
    • Stash
    • Log filter
  • Cookbook
    • Undo
    • Branches
    • Diff
    • Stash
    • Merge
    • Hooks
    • Squashing
    • Rebase
    • Interactive Rebase
    • LFS
    • Submodules
    • Remote
    • Force push
    • Identify merged branches
    • Formated patches
    • Apply patches
    • Interactive rebase
    • Squash commits
    • Pull rebase
    • Log
    • Blame
    • Biset
    • Reset
  • Exercise
    • Exercise 1
    • Exercise 2
Powered by GitBook
On this page
  1. Intermediate Concepts

Pull

What if you want the remote changes go directly into the local branches (instead of stopping at the tracking branch)? You can do a pull.

  • A pull is no special than a fetch right followed by a merge.

  • Since a merge is involved in a pull, conflicts might occur. Hence Git might halt and ask you to solve the conflicts before the merge can be completed.

  • Some people prefer doing a fetch first, inspect the changes, do some more work, then merge.

Similarly, pulling regularly helps reduce the divergence between the local and remote. It's always eaasier to deal with multiple small conflicts than a single large one.

PreviousFetchNextPush

Last updated 1 year ago