标签:string art 技术分享 stream apt-get ase color 邮箱 hub
不积跬步,无以至千里。不积小流,无以成江海。
安装方式主要有两种,即通过Apt和source:
Apt安装:官网上提供的命令是:
$ sudo add-apt-repository ppa:git-core/ppa中间暂停时,按回车键Enter继续安装。
$ sudo apt-get update
$ sudo apt-get install git  安装下载完成后,可以使用下面的命令行,确认git的版本:
$ git --version 2. git配置
git首先,是指定用户名和邮箱:
$ git config --global user.name "Your Name"
$ git config --global user.email "youremail@domain.com"可以如下查看配置信息:
$ git config --listrepository创建一个名为myGitTest的repository:
$ git init myGitTest然后切换,文件路径到myGitTest:
$ cd myGitTest依次添加文件README和sample.cpp
$ gedit README
$ gedit sample.cpp
在README文件内随便写入一些内容:This is my first Git and GitHub test conducted on my Ubuntu Wily system.同理,在sample.cpp中写入一段代码:
#include <iostream>
int main()
{
    std::cout << "Hello Git!" << std::endl;
    return 0;
}将这两个文件通过git添加到刚刚创建的myGitTest:
$ git add README
$ git add smaple.cpp现在,将myGitTest的变化更新情况提交:
$ git commit -m "create a git project"标签:string art 技术分享 stream apt-get ase color 邮箱 hub
原文地址:http://www.cnblogs.com/yongxo/p/7225618.html