1.使eclipse与github账号进行链接。
1.1注册github账号。
网址:GitHub: Where the world builds software · GitHub
1.2在eclipse上安装git插件。
打开eclipse-->help-->eEclipse Marketplace
(使用的eclipse版本为2021-12)
在搜索栏内搜索git并点击install安装。
1.3设置git插件
打开windows-->PrefeRences-->Version control-->git-->Configuration
并添加上github账号的邮件和名称。
(关键字user.name user.email)
1.4链接github
打开General-->Network connections-->SSH2-->Key Management-->Generate RSA key
生成密匙。
将密匙粘贴到github中,链接完成。
2.将代码上传至github。
2.1创建github库。
2.2编写代码。
此次写代码的为输出”hello world”.
2.3提交至gihub库中。
(1)右键project-->Team-->commit
(2)点击➕将文件转到待提交区,并且右边附上描述,最后点击Push.
(3)在URI栏内将github库中的SSH链接复制上去
(4)一直下一步到push并且右下角出现进度条说明上传成功。