将本地的工程添加到gihub的远程仓库中

1.在本地创建一个maven工程(你可以使用maven命令,eclipse插件,idea等工具),如springPropertyPlaceHolderExample

2.cd springPropertyPlaceHolderExample

3.git init

4.git add .

5.git commit -m 'init'

6.在你的github上创建springPropertyPlaceHolderExample仓库。

7.执行

git remote add origin [email protected]:yongchun/springPropertyPlaceHolderExample.git

执行这一步是假设你的本地git环境(ssh key,user.name,user.email都已经配置好了,和你的github的一致)

8.执行

git push -u origin master

到此,工作就算完成了。到github的仓库看看吧。

截图如下:



 

猜你喜欢

转载自aliahhqcheng.iteye.com/blog/1983167