Pushing changes to GitHub

As you commit changes to your project locally, you can push those changes to GitHub so that others may access them from the remote repository.

People with write permissions can push changes to a repository.

In this article

Did this doc help you?

Help us make these docs great!

All GitHub docs are open source. See something that's wrong or unclear? Submit a pull request.

Make a contribution

Or, learn how to contribute.

About pushing changes to GitHub

When you push changes, you send the committed changes in your local repository to the remote repository on GitHub. If you change your project locally and want other people to have access to the changes, you must push the changes to GitHub.

Before pushing changes, you should update your local branch to include any commits that have been added to the remote repository. If someone has made commits on the remote that are not on your local branch, GitHub Desktop will prompt you to fetch the new commits before pushing your changes to avoid merge conflicts. For more information, see "Syncing your branch."

Repository administrators can enable protections on a branch. If you're working on a branch that's protected, you won't be able to delete or force push to the branch. Repository administrators can enable other protected branch settings to enforce specific workflows before a branch can be merged. For more information, see "About protected branches."

Pushing changes to GitHub

Note: GitHub Desktop will reject a push if it exceeds certain limits.

  • A push contains a large file over 100 MB in size.
  • A push is over 2 GB in total size.

If you configure Git Large File Storage to track your large files, you can push large files that would normally be rejected. For more information, see "About Git Large File Storage and GitHub Desktop."

  1. Click Push origin to push your local changes to the remote repository.
    The Push button
  2. If GitHub Desktop prompts you to fetch new commits from the remote, click Fetch.
    The Fetch button
  3. Optionally, click Create Pull Request to open a pull request and collaborate on your changes. For more information, see "Creating an issue or pull request"
    The Create Pull Request button

Further reading

Did this doc help you?

Help us make these docs great!

All GitHub docs are open source. See something that's wrong or unclear? Submit a pull request.

Make a contribution

Or, learn how to contribute.