Eclipse+Github+“hello world“(简单清楚)
Eclipse+Github+"hello world"(简单清楚)
- 下载链接
- 安装
- Github仓库
- 创建一个GitHub仓库
- GitHub客户端
- Eclipse
- 安装EGit插件
- 创建hello world代码
- 创建本地仓库
- push到GitHub的仓库
- 由GitHub上传
Eclipse Downloads | The Eclipse Foundation
Github账号注册:GitHub
Github客户端下载:GitHub Desktop | Simple collaboration from your desktop
Java下载jdk:Java Archive Downloads - Java SE 8 (oracle.com)
jdk、Eclipse、Github客户端下载下来
http://download.eclipse.org/egit/updates
-
Help->Install New Software...->Add
-
输入地址到Location
-
全选安装,重启Eclipse
-
Windows->Preferences->Version Control(Team)->Git->Configuration->Add Entry
-
添加自己的GitHub邮箱、用户名,Apply and Close
创建hello world代码
-
创建一个Java的project
-
取一个名字,finish
-
创建一个class
-
取一个名字,finish
-
hello world代码
public class helloworld {
public static void main(String[] args) {
// TODO Auto-generated method stub
System.out.println("hello");
}
}
创建本地仓库
Help->Install New Software...->Add
输入地址到Location
全选安装,重启Eclipse
Windows->Preferences->Version Control(Team)->Git->Configuration->Add Entry
添加自己的GitHub邮箱、用户名,Apply and Close
创建一个Java的project
取一个名字,finish
创建一个class
取一个名字,finish
hello world代码
public class helloworld {
public static void main(String[] args) {
// TODO Auto-generated method stub
System.out.println("hello");
}
}
1.Team->Share progect
- 如图->
finish
Team->Commit
- 将需要提交文件加入Index

- 在Commit Message随便写一点修改了什么,然后提交

push到GitHub的仓库
1.Team->Remote->Push
2.用之前的Local Path(就是克隆到本地的GitHub仓库)填入
3.
由GitHub上传
- 修改情况已经能从GitHub客户端查看
- 点击
Publish branch上传
- GitHub上就有上传的代码啦
