There was some github.com down time today that I wasn't aware of until I went to push about one dozen local commits.
Here's the message I received when trying to push to github.com:
remote: Unexpected system error after push was received. remote: These changes may not be reflected on github.com! remote: Your unique error code: abcdefghijklmnopqrstuvwxuz
Now that github.com is back up, when I view the project commit history online, I can see these dozen commits have not been pushed up to the repo.
I figured I could just push these changes again with git push origin master
, but I am told Everything up-to-date
. Similarily a git pull origin master
also shows Everything up-to-date
.
How can I get these local changes pushed up to my repo on github.com?
If git push origin master not working , all you need to do is edit that file with your favourite editor and change the URL = setting to your new location. Assuming the new repository is correctly set up and you have your URL right, you'll easily be able to push and pull to and from your new remote location.
The git push command is used to upload local repository content to a remote repository. Pushing is how you transfer commits from your local repository to a remote repo. It's the counterpart to git fetch , but whereas fetching imports commits to local branches, pushing exports commits to remote branches.
The steps to follow in order to push new Git branches to remote repos such as GitHub, GitLab or Bitbucket are as follows: Clone the remote Git repo locally. Create a new branch with the branch, switch or checkout commands. Perform a git push with the –set-upstream option to set the remote repo for the new branch.
I hate to answer my own question so quickly, but with a little tinkering, here's a quick work around I discovered:
echo "bar" >> foo.txt git add foo.txt git commit -m "Add foo.txt" git push origin master git rm foo.txt git commit -m "Remove foo.txt" git push origin master
This properly refreshed the commit history for my github.com repo. This should be safe to do, but definitely take a backup of your local code before trying it.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With