My push never seems to finish!


For some students, GitHub Desktop seems to choke when you push your commits, meaning that the "Push to origin" arrows seem to just spin forever.

This seems to occur most frequently with students who have low upload speeds when they try to upload large images or a lot of images in their commit (although this isn't always the case). Regardless of the reason, there is a tried and true method to get your changes through.

Follow the instructions below if your push never seems to be taking forever (and consider ALWAYS using the steps below when pushing in the future, to save yourself time and stress).

Undoing your commit

  1. First, quit GitHub Desktop.

    Don't just close or minimize it; make sure you've actually completely shut down the app. 

    You may need to Force-quit the app if it isn't behaving.

    Then, open GitHub Desktop again; it shouldn't be pushing anymore.

  2. GitHub Desktop is probably in the Changes tab by default; click on the History tab to switch over to that view.

    In the History view, you'll see a list of all the commits you've ever made, with the most recent at the top.

    The commit you were unable to push should have a little arrow next to it; this means that this commit hasn't been pushed yet.

    Right-click on that commit.

    Switch to the History tab, identify the commit to undo, and right-click it
    Switch to the History tab, identify the commit to undo, and right-click it
  3. This should open up a context menu.

    Click the option that says "Undo commit"

    WARNING: Be very cautious in this view.

    NEVER EVER click the option that says "Revert commit"!

    This can potentially erase large chunks of your work from version control; it is possible to recover from this, but it will take a lot of time and effort to fix.

    Click the 'Undo commit...' option
    Click the 'Undo commit...' option

Redoing your commit, one image at a time

  1. Return to the Changes tab.

    All the file changes that went into that commit you just undid should be visible again in this view.

    First, select ONLY the code files (files that end in .html or .css), or conversely, uncheck all the non-code files.

    Then do a complete commit and push JUST for the code files.

    Select only code files (.html, .css) to commit and push
    Select only code files (.html, .css) to commit and push
  2. Next, select ONE SINGLE image file (files that end in .jpg, .jpeg, .png, .webp).

    Then do a complete commit and push JUST for that single image file.

    DON'T COMMIT ANOTHER IMAGE UNTIL YOU PUSH THE FIRST.

    It was committing multiple images that got you into this mess in the first place, so don't do it again!

    The push for the single image should go fairly quickly.

    Now repeat for each remaining image: commit and push ONE IMAGE AT A TIME, until you have pushed all the remaining images.

    Select only ONE files (.jpg, .jpeg, .png, .webp) at a time to commit and push
    Select only ONE files (.jpg, .jpeg, .png, .webp) at a time to commit and push

Congrats! You should have been able to push all the files in your commit!

Consider always committing/pushing images one at a time in the future.

×