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

git客户端初始化

时间:2016-09-25 16:01:21      阅读:138      评论:0      收藏:0      [点我收藏+]

标签:

 

 

 

 

 

 

 

 

 

安装git客户端:
[root@super67 ~]# yum install -y git

配置git信息:
[root@super67 ~]# git config --global user.name "xiaofan"
[root@super67 ~]# git config --global user.email "750657961@qq.com"
[root@super67 ~]# 
[root@super67 ~]# git config --list
user.name=xiaofan
user.email=750657961@qq.com


创建git目录:
[root@super67 ~]# mkdir xiaofan
[root@super67 ~]# cd xiaofan/
[root@super67 xiaofan]# git init
Initialized empty Git repository in /root/xiaofan/.git/


[root@super67 xiaofan]# ls
[root@super67 xiaofan]# ll -a
total 12
drwxr-xr-x 3 root root 4096 Sep 25 11:33 .
dr-xr-x---. 30 root root 4096 Sep 25 11:33 ..
drwxr-xr-x 7 root root 4096 Sep 25 11:33 .git
[root@super67 xiaofan]# vim one.txt
[root@super67 xiaofan]# cat one.txt 
1 haha


查看状态:
[root@super67 xiaofan]# git status
# On branch master
#
# Initial commit
#
# Untracked files:
# (use "git add <file>..." to include in what will be committed)
#
# one.txt
nothing added to commit but untracked files present (use "git add" to track)


提交:
[root@super67 xiaofan]# git commit -m "the first commit"
# On branch master
#
# Initial commit
#
# Untracked files:
# (use "git add <file>..." to include in what will be committed)
#
# one.txt
nothing added to commit but untracked files present (use "git add" to track)

git客户端初始化

标签:

原文地址:http://www.cnblogs.com/fanxuanhui/p/5906055.html

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