码迷,mamicode.com
首页 > 其他好文 > 详细

Git安装

时间:2017-11-28 21:05:04      阅读:136      评论:0      收藏:0      [点我收藏+]

标签:文件   account   email   count   osi   git   bsp   dir   get   

系统:Ubuntu  

1,安装

查看是否安装            git

安装                           sudo apt-get install git

2,创建仓库

创建目录git               mkdir  git 

进入目录     cd git/

创建仓库               git init

3,添加

创建文件                      touch  firstgit.txt

添加到暂存区               git add firstgit.txt

提交到当前分支            git  commit –m “XXXXXXXX”             

(“XXXXXXXX”为提交描述)

 

遇到问题

*** Please tell me who you are.
Run

  git config --global user.email "you@example.com"

  git config --global user.name "Your Name"

to set your account‘s default identity.

Omit --global to set the identity only in this repository

运行

git config --global user.email "you@example.com"

git config --global user.name "Your Name"

 

4,查看结果 git status 

 

ok了

 

Git安装

标签:文件   account   email   count   osi   git   bsp   dir   get   

原文地址:http://www.cnblogs.com/hanyu258/p/7911969.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!