1. 配置git
windows->preferences->team->git->congfiguration
user:add entry,添加內(nèi)容如下
2. 創(chuàng)建倉庫
2.1登陸github賬號,新建倉庫,new repositories
2.2倉庫創(chuàng)建成功后,點擊 HTTP ,復(fù)制其中的地址,后面將會用到
3. 在eclipse創(chuàng)建本地git倉庫
在eclipse選擇一個項目->右擊-team->share project
create? a git repository->選擇倉庫地址
4. commit項目到本地gith到本地倉庫
選中項目-> 右擊->team-commit
在unstaged changes選擇要提交的文件->右擊->add to index->填寫commit message->commit
5. push到git遠程倉庫
選中項目->右擊->team->remote->push->填寫url(2中創(chuàng)建的倉庫的http地址,git賬號、密碼->一路next、finish