As commits are pushed to your project on GitHub, you can keep your local copy of the project in sync with the remote repository.

You must sync your local branch with the remote repository to get any additional commits that have been added to the upstream branch since you originally created your branch.

In this article:

Update your local branch

  1. In GitHub Desktop, switch to the local branch you want to update by clicking Current Branch and selecting the branch from the list.
  2. Click Fetch origin to update your branch. The Fetch origin button
  3. If there are commits on the remote branch, you can pull these by clicking Pull origin. The Pull origin button

Merge another branch into your project branch

  1. At the top of the app, click Current Branch. Current Branch drop-down menu

  2. Click Choose a branch to merge into BRANCH. Choose a branch option in the list of branches menu

  3. Click the branch you want to merge into the current branch, then click Merge BRANCH into BRANCH.

    Note: If there are merge conflicts, GitHub Desktop will warn you above the Merge BRANCH into BRANCH button. You will not be able to merge the branches until you have resolved all conflicts. For more information, see "Resolving a merge conflict."

    The Merge button

  4. Click Push origin to push your changes to the remote. The Push button

Resolving a merge conflict

  1. At the top of the app, click Current Branch. Current Branch drop-down menu

  2. Click Choose a branch to merge into BRANCH. Choose a branch option in the list of branches menu

  3. Click the branch you want to merge into the current branch, then click Merge BRANCH into BRANCH.

    The Merge button with a merge conflict warning

  4. Click Open in EDITOR to fix the files that contain conflicts in your default editor. You can also click open the command line to resolve the conflict in the command line. For more information about fixing conflicts in the command line, see "Resolving a merge conflict using the command line." Resolving merge conflicts window
  5. Click Commit merge. Commit merge after conflicts are resolved option
  6. Click Push origin to push your changes to the remote. The Push button