Git Questions – How to Keep a Git Fork up to Date

Carrying on our series of Git Questions, this week Gary Hockin (PhpStorm Advocate) and I look at the question: how do I make sure my GitHub fork is up to date when the open source project it forked has moved on?

GitHub’s help does, of course, cover this question. But not everyone is comfortable working from the command line, and even those who are, sometimes prefer to use the IDE if they’re already working in it.

This video shows an answer to this question which uses Git’s fetch, pull and push from within IntelliJ IDEA.

This entry was posted in Tips & Tricks and tagged , , , . Bookmark the permalink.

5 Responses to Git Questions – How to Keep a Git Fork up to Date

  1. That80sGuy says:

    Why was the “Update project” action (Ctrl-T) not mentioned? IMHO it’s the simplest way to get remote changes for the current branch and I use it daily. It stashes/shelves any changes if needed, fetches remote changes, rebases/merges to bring in the changes and unstashes/unshelves as needed.

    • Trisha Gee says:

      This works for the remote your branch is tracking. Given the example in the video, this would work to update master from the “trisha” remote, but not from the upstream mongodb remote. What we needed to do was update the current branch from a different remote, and push those changes to our own remote.

  2. Adelle says:

    Thank you for the tutorial!

  3. Amila Kumara says:

    nice video guide. keep this up. it really helps us to understand the power of IDEA

  4. Mike says:

    If you aren’t working on an open source project where all the development is distributed just use subversion. Git is far too complicated for centralized development.

Leave a Reply

Your email address will not be published. Required fields are marked *