我意识到我设置user.name
错了,所以我用这个答案来修复不正确的提交。在本地,它工作得很好。但是,git 现在告诉我
$ git status
# On branch master
# Your branch and 'origin/master' have diverged,
# and have 15 and 15 different commits each, respectively.
# (use "git pull" to merge the remote branch into yours)
#
nothing to commit, working directory clean
所以,现在我需要以某种方式将我的更改发送到我的 GitHub 存储库,但是当我推送时:
$ git push
WARNING: gnome-keyring:: couldn't connect to: /run/user/mspencer/keyring-uscL41/pkcs11: No such file or directory
Username for 'https://github.com': iBeliever
Password for 'https://iBeliever@github.com':
To https://github.com/iBeliever/weather-desktop.git
! [rejected] master -> master (non-fast-forward)
error: failed to push some refs to 'https://github.com/iBeliever/weather-desktop.git'
hint: Updates were rejected because the tip of your current branch is behind
hint: its remote counterpart. Merge the remote changes (e.g. 'git pull')
hint: before pushing again.
hint: See the 'Note about fast-forwards' in 'git push --help' for details.
我不太确定如何解决这个问题。我之前处理过远程更改,并通过拉取和合并解决了它们,但我不确定在这种情况下该怎么做。我需要使用更正的名称更新我的 GitHub 存储库,我该怎么做?