git客户端初始化

 

 

 

 

 

 

 

 

 

安装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)

转载于:https://www.cnblogs.com/fanxuanhui-linux/p/5906055.html

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值