如何在 Atom 中设置 Git-plus 以与 Github 一起使用

声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow 原文地址: http://stackoverflow.com/questions/36649290/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me): StackOverFlow

提示:将鼠标放在中文语句上可以显示对应的英文。显示中英文
时间:2020-09-19 11:57:03  来源:igfitidea点击:

How to setup Git-plus in Atom to work with Github

gitgithubatom-editor

提问by yingzhao

On Windows, I installed the git-plus packagein Atom by installing it from Atom main menu FileSettingsInstall. Using git config, I then configured user.emailand user.nameand made sure that they reflect my account and email address in Github.

在 Windows 上,我git-plus package通过从 Atom 主菜单FileSettings→安装 Atom 来安装它Install。使用git config,然后我配置user.emailuser.name确保它们反映了我在 Github 中的帐户和电子邮件地址。

I then followed the instructions, from the GitHub site, I generated new pair of ssh keys. I made sure that there is only one pair of keys on my system. Now with git-plusand the ssh keys configured, how do I go about start working on files on my Github repository?

然后我按照说明从 GitHub 站点生成了一对新的 ssh 密钥。我确保我的系统上只有一对密钥。现在git-plus配置了 ssh 密钥,我该如何开始处理 Github 存储库中的文件?

回答by yingzhao

I tried the steps below and it seems to be working fine.

我尝试了以下步骤,它似乎工作正常。

  • Clone your GitHub repository using SSH, such as, git clone @github.com:.git Note, if you perform clone from Git Bash for the first time, host, github.com, will be added into file, KNOWN_HOST, which on Windows, it is in .ssh The command creates a local copy of original/master from your GitHub
  • Add the local copy of your repository to Atom. From Atom menu, File > Add Project Folder…
  • Verify that you can work with your GitHub repository, e.g., performing pull. In Atom, open Git command line, Ctrl+Shift+H, and type in pull, then from the available branch list choose > original/master
  • 使用 SSH 克隆您的 GitHub 存储库,例如 git clone @github.com:.git 注意,如果您是第一次从 Git Bash 执行克隆,主机 github.com 将被添加到文件 KNOWN_HOST 中,在 Windows 上,它在 .ssh 命令从你的 GitHub 创建一个 original/master 的本地副本
  • 将存储库的本地副本添加到 Atom。从 Atom 菜单中,文件 > 添加项目文件夹...
  • 验证您是否可以使用您的 GitHub 存储库,例如执行拉取。在 Atom 中,打开 Git 命令行,Ctrl+Shift+H,然后输入 pull,然后从可用分支列表中选择 > original/master