1、配置用户信息
git config -- global user.name "chhm0701"
git config -- global user.email "1107653553@qq.com"
2、查看用户信息
git config --list
3、初始化
git init
4、添加
git add xxx
5、提交
git commmit -m "xxx xxx"
6、查看状态
git status
7、取消暂存,回退到工作区
$ git reset head xxx
$ git checkout -- xxx
8、回退
$ git log
$ git reset --hard 版本号
9、删除
$ git rm bash_test.txt
$ git commit -m "xxx xxx"
注:几个常用的linux命令
$ pwd 输出当前工作目录路径
$ ll 输出当前文件夹下文件详细信息
$ ls 输出当前文件下文件信息
$ cat 输出文件内容
$ echo "xxx xxx" >> xxx 追加xxx xxx 到 xxx