---
title: "将本地的工程添加到gihub的远程仓库中"
author: "aliahhqcheng"
date: "2013-11-30T11:45:23Z"
tags: []
categories: ["开源软件"]
slug: "gihub"
draft: false
lastmod: "2013-11-30T11:45:23Z"
id: 1983167
url: "https://aliahhqcheng.iteye.com/blog/1983167"
---

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 git@github.com:yongchun/springPropertyPlaceHolderExample.git

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

8.执行

git push -u origin master

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

截图如下：

![](http://dl2.iteye.com/upload/attachment/0091/7169/a19e32f5-1694-3752-99d2-7560f3a72f87.png)