IDEA 配置Git 提交、下载、更新项目、并上传到GitHub上

前期准备

注册GitHub账号、创建GitHub仓库、项目部署到GitHub需要。

教程 :GitHub创建仓库教程

下载Git: https://git-scm.com/

安装Git:https://www.cnblogs.com/wj-1314/p/7993819.html


IDEA上的操作

1.在IDEA上配置Git、GitHub

 File-->setting-->Vsersion Control-->Git  选择已安装的Git路径bin目录下的git.exe

File-->setting-->Vsersion Control-->GitHub 添加绑定GitHub账号

2.创建本地Git仓库

VCS -->Import into Version Control -->Create Git Repository   选中当前项目-->成功后项目会发生变化如图四所示

3.添加项目到Git

Git-->add  项目发生变化文件变成绿色

4.提交项目到Git

Git-->commit Directory   填写提交信息、选择提交。

提交后项目变成白色

5.提交项目到GitHub 

如提交项目出现以下错误,参照连接https://blog.csdn.net/donkor_/article/details/77502800

Warning: Permanently added the RSA host key for IP address '192.29.255.115' to the list of known hosts. 
Permission denied (publickey). 
fatal: Could not read from remote repository. 
Please make sure you have the correct access rights and the repository exists

 

VCS--->Import into Version Control -->share Project on GitHub 

填写信息Repository name:仓库名  

Remote:远程路径

Description:提交信息

表示成功上传;可到GitHub上查看

6.更新项目并同步到GitHub上

更新或新添加的项目为绿色

项目右键 Git--->commit Directory--->Commit and push 

Commit and push ​​​​​​:提交并同步到GitHub

成功提交

上GitHub上查看已同步

 

7.GitHub项目更新到本地项目

Git --> Repository --> pull  

点击 pull 就可以了

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值