Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

IntelliJ IDEA 提交代码到 GitHub #11

Open
Qingquan-Li opened this issue Jan 11, 2017 · 6 comments
Open

IntelliJ IDEA 提交代码到 GitHub #11

Qingquan-Li opened this issue Jan 11, 2017 · 6 comments
Labels

Comments

@Qingquan-Li
Copy link
Owner

一、设置相关绑定

  1. Settings—>Version Control—>Git(提前下载好)—>Path to Git executable—>选择你提前下载好的的 git.exe 安装目录
    1 git exe

  2. Settings ——Version Control——GitHub(Host:github.com,Login:账号,Password:密码 )
    2 github


二、配置远程

  1. Share Project on GitHub(上传项目到GitHub) :
    VCS—>Import into Version Control—>Share Project on GitHub
    share project on github

  2. Clone 克隆 GitHub 上的代码到本地:
    在 GitHub 上创建仓库后,复制仓库地址,比如 https://github.com/FatliTalk/test
    在 IntelliJ IDEA 中 VCS—>Checkout from Version Control—>Git(或GitHub)中,粘贴仓库url地址(选择仓库),从 GitHub 仓库中 Clone 克隆一份项目,然后就可以在本地进行修改,然后再 Push 到 GitHub(见2.3)。
    github

  3. IntelliJ IDEA 上 Push 修改后的代码到 GitHub:
    选中项目—>右键—>Git—>Repository—>Push(在 Push 到 GitHub 之前,需 Add—>Commit 到本地仓库)
    PS:在实际开发过程中,我们还可以使用本地的 git(或者 GitHub 客户端)进行版本管理 ,最后使用push 进行远程提交。
    push to github



——END

@2629743986
Copy link

你好,请问一下,我按照你的方法点击 Share Project on Github 但是出现这个错误
Successfully created project 'FirstSpringBoot' on GitHub, but initial push failed: Could not read from remote repository.
我的项目名是FirstSpringBoot 而且git 和 github的配置我都设置成功了.

@Qingquan-Li
Copy link
Owner Author

@2629743986 你好,你在GitHub上成功创建了项目,但问题在于“初始推送失败:无法从远程存储库读取。” 我觉得可能是 GitHub 的问题,毕竟服务器在国外,有时候会连接失败,建议按照教程再作尝试。

@2629743986
Copy link

恩,我再重新下载一个Git .谢谢

@fangx1129
Copy link

@FatliTalk
sshexecutable 选择 Native

@roceys
Copy link

roceys commented Jun 29, 2018

@2629743986
In IntelliJ IDEA go to VCS -> Git -> Remotes..., select row containing "origin" and click on edit button. If you host your repository on GitHub, replace your SSH URL from:

git@github.com:USERNAME/REPOSITORY.git

to:

https://github.com/USERNAME/FirstSpringBoot.git

@Qingquan-Li Qingquan-Li added Git and removed GitHub labels Apr 5, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

4 participants