Intermediate Git
George Boorman
Curriculum Manager, DataCamp


origin remotegit fetch origin
Fetch all remote branches
Might create new local branches if they only existed in the remote
Doesn't merge the remote's contents into local repo
origin remote's main branchgit fetch origin main
From https://github.com/datacamp/project
 * branch                main     -> FETCH_HEAD
origin remote's default branch (main) into the local repo's current branchgit merge origin
Updating 9dcf4e5..887da2d
Fast-forward
 tests/tests.py | 13 +++++++++++++
 README.md     | 10 ++++++++++
 2 files changed, 23 insertions (+)
Git simplifies this process for us!
Fetch and merge from the remote's default (main) into the local repo's current branch
git pull origin
origin remote's dev branchgit pull origin dev
From https://github.com/datacamp/project
 * branch                dev     -> FETCH_HEAD
Updating 9dcf4e5..887da2d
Fast-forward
 tests/tests.py | 13 +++++++++++++
 README.md     | 10 ++++++++++
 2 files changed, 23 insertions (+)
git pull origin
Updating 9dcf4e5..887da2d
error: Your local changes to the following files would be overwritten by merge:
       README.md
Please commit your changes or stash them before you merge.
Aborting
remoteIntermediate Git