$git config [--local | --global | --system] user.name ‘your_name‘
$git config [--local | --global | --system] user.email ‘your_email@domain.com‘
操作者的用户名、邮箱
system不常用
$ git config --list --global
$ mkdir gitlearning
$ cd gitlearning/
//初始化
$ git init
$ git add readme
//提交状态
$ git status
//提交全部修改的文件
$ git add -u
//提交所有
$ git add *
$ git commit -m ‘add readme‘
$ git mv readme readme.md
$ git log -n2 --oneline
//分支
$ git checkout -b temp 38614d12fc176119de2df60b5526a2c32503b1f6
$ git branch -av
$ git log --all --graph
$ git log --oneline --all
$ git log --oneline temp
//head文件夹下的各个文件
COMMIT_EDITMSG config index objects
HEAD description info refs
branches hooks logs
//查看命令
cat HEAD
HEAD 记录当前分支
config 记录[user]
原文:https://www.cnblogs.com/cracker13/p/10445825.html