Eclipse+Github+“hello world“(简单清楚)

Eclipse+Github+“hello world”(简单清楚)

下载链接

安装

  1. jdkEclipseGithub客户端下载下来
  2. 全默认无脑下一步安装完成

Github仓库

创建一个GitHub仓库

  1. 点击Create a new repository

取一个项目名点击Create repository,仓库建立完毕

image-20210925161159289

GitHub客户端

登录,选择你的仓库并克隆仓库到本地

image-20210925162053486

记一下仓库的local path,后面要用到

image-20210925162158590

Eclipse

安装EGit插件

插件地址http://download.eclipse.org/egit/updates

  1. Help->Install New Software...->Add

  2. 输入地址到Locationimage-20210925163019554

  3. 全选安装,重启Eclipse

  4. Windows->Preferences->Version Control(Team)->Git->Configuration->Add Entry

  5. 添加自己的GitHub邮箱、用户名,Apply and Closeimage-20210925163608768

创建hello world代码

  1. 创建一个Java的projectimage-20210925163820670

  2. 取一个名字,finishimage-20210925164221485

  3. 创建一个classimage-20210925164317331

  4. 取一个名字,finishimage-20210925164418717

  5. hello world代码

    public class helloworld {
    	public static void main(String[] args) {
    		// TODO Auto-generated method stub
    		System.out.println("hello");
    	}
    }
    

创建本地仓库

1.Team->Share progectimage-20210925164707288

  1. 如图->finishimage-20210925165110053
  2. Team->Commitimage-20210925165223041
  3. 将需要提交文件加入Indeximage-20210925165520938
  4. 在Commit Message随便写一点修改了什么,然后提交image-20210925165651655

push到GitHub的仓库

1.Team->Remote->Pushimage-20210925165758859

2.用之前的Local Path(就是克隆到本地的GitHub仓库)填入image-20210925170418178

3.image-20210925170606948

由GitHub上传

  1. 修改情况已经能从GitHub客户端查看
  2. 点击Publish branch上传image-20210925172333075
  3. GitHub上就有上传的代码啦image-20210925172504738
  • 3
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 1
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论 1
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值