单机上使用 git
安装git,初始化git仓库
yum install git -y
mkdir /data/gitroot
cd /data/gitroot
git init
添加代码,提交,查看状态
echo -e "abc\ndef\nghi" > test.file
git add test.file
git commit -m "add test.file v1"
再次修改 test.file
git add test.file
git commit -m "modify test.file v2"
git status
再次修改 test.file,查看状态
提交之后,查看日志记录
git log