无法从 Atom 编辑器推送 GitHub 更改

Cannot push GitHub changes form Atom editor

我一直在尝试使用 GitHub 的 Atom 编辑器,但正在努力使 GitHub 集成正常工作。我从我的帐户克隆了一个存储库,但无法将更改推送回 GitHub。

我刚刚添加了一个名为 "otherfile.html" 的测试文件,提交了这些更改,并尝试推送它。如果我输入我的用户名和个人访问令牌(我有双因素身份验证设置),它会为 GitHub 提供两次登录。然后它给了我这个错误信息:

The tip of your current branch is behind its remote counterpart. Try pulling before pushing again. Or, to force push, hold cmd or ctrl while clicking.

不确定是否相关,但 GitHub 选项卡是这样说的:

No Pull request could be found fo the branch master on the repository gabrielewig/gabrielewig.github.io

You can manually pin a GitHub pull request to the current branch by entering its URL:

如有任何帮助,我们将不胜感激!可以在此处找到确切的回购协议:https://github.com/gabrielewig/gabrielewig.github.io

首先,切换到命令行看看git status给你什么。
如果它仍然提到你的 master 分支落后于它的远程分支,那么做一个 git pull

其次,检查您的 git config credential.helper 值。
例如,在 Windows 上,GCM helper 需要您的 username/password(不是 PTA)才能创建 PTA。


最后,检查“Improved pull request experience in GitHub for Atom”(2018 年 9 月)

we’ve added a pull request list view. Now you can see the most recent pull requests in the GitHub tab Ctrl+8 with information such as:

  • Author’s avatar
  • Title of the pull request
  • Pull request number
  • CI status
  • “Last Updated” information

In addition to seeing more information about your existing pull requests, you can also open a new pull request directly from Atom.