---
title: "GIT初步使用"
author: "tojaoomy"
date: "2012-07-24T16:45:36Z"
tags: []
categories: ["非技术"]
slug: "git"
draft: false
lastmod: "2012-08-31T13:49:22Z"
id: 1605731
url: "https://tojaoomy.iteye.com/blog/1605731"
---

今天一直在想，怎么可以在Eclipse上把代码托管到像Github或CodeGoogle上，

今天试了一下午，都没有成功（不知道是网络的原因还是什么的，悲催的），无奈只能用命令行使用。以下是

基本步骤：

1.下载Git客户端

Git：[http://win.softpedia.com/dyn-search.php?search\_term=git&x=0&y=0](http://win.softpedia.com/dyn-search.php?search_term=git&x=0&y=0)

SmartGt：[http://www.syntevo.com/smartgit/download.html](http://www.syntevo.com/smartgit/download.html)

2.在github注册，“New repository”，完成基本的操作

3.创建密钥，详情参见：[https://help.github.com/articles/generating-ssh-keys](https://help.github.com/articles/generating-ssh-keys)

其他的就不多说了，因为哥们也是新手，其他的命令参考以下链接

[http://www.cnblogs.com/fnng/archive/2012/01/07/2315685.html](http://www.cnblogs.com/fnng/archive/2012/01/07/2315685.html)

[http://www.open-open.com/lib/view/open1335879873983.html](http://www.open-open.com/lib/view/open1335879873983.html)

 

经过一段时间的使用，稍微对git有点上手了，在他的安装目录bin下发现很多Linux命令的exe文件，

发现curl，上网搜索了一下，果然强大。

 

不如说从网上抓取网页，下载文件等等，好吧，先看一个例子好了

curl -x 16.\*.\*.\*:\** -o baidu.html [www.baidu.com](http://www.baidu.com)

后面-x 16.\*.\*.\*:\** 是设置代理（如有必要）。

 

[http://www.linuxidc.com/Linux/2008-01/10891.htm](http://www.linuxidc.com/Linux/2008-01/10891.htm)