Jason Lee Jason Lee - 1 month ago 5x
Git Question

Updating my files to recently committed github repo

I'm currently working on a projects with my partner, and he forked the repo and made changes, and than pushed it.

I assume my project on my computer won't automatically update to his changes, right?

So how do I make sure all my files and settings are in sync with the most recent commit?


There are two ways in which you can do this:

  • Use git fetch to retrieve new work done by other people. Fetching from a repository grabs all the new remote-tracking branches and tags without merging those changes into your own branches.
  • If you already have a local repository with a remote URL set up for the desired project, you can grab all the new information by using git fetch *remotename* in the terminal:
  • Then doing a git merge


  • git pull is a convenient shortcut for completing both git fetch and git merge in the same command

  • Syntax: git pull remotename branchname will grab online updates and merges them with your local work