1. git 六行配置
    2. git config --global user.name 你的英文名
    3. git config --global user.email 你的邮箱
    4. git config --global push.default simple
    5. git config --global core.quotepath false
    6. git config --global core.editor "code --wait"
    7. git config --global core.autocrlf input
    8. git config --global --list
    1. 查看当前目录绝对路径 pwd
    2. 查看当前目录内容 ls
    3. 查看指定目录内容 ls路径
    4. 查看文件内容
    5. cat路径(文件全部内容) head路径(文件前xx行) tail路径(文件后xx行) less路径(实时滚动查看)
    6. head xxx.txt -n 15 (查看前15行)
    1. 创建目录
    2. touch 1.txt
    3. echo hi > 1.txt 一个>是覆盖
    4. echo hihi >> 1.txt 两个是追加
    5. echo -e "1\n2" > 1.txt
    1. mkdir a
    2. mkdir -p a/b/c 递归创建
    3. touch 1.txt 2.txt
    4. mkdir a b
    5. rm 删除命令 rm -r删除文件
    6. 移动和重命名 mv
    1. git add. git commit -v
    2. git config
    3. git init 创建 .git
    4. git add 选者要提交的内容
    5. gitignore 文件描述不可提交的内容
    6. git commit -v 用来提交
    7. git log 用来查看历史
    8. git reset --hard xxxxxx 切换版本查看
    9. git reflog 用来查看所有历史版本
    10. git merge 合并分支
    11. git branch 基于当前创建一个新的时间线 分支
    12. gir checkout 用于切换另一个分支
    13. git stash (pop)
    14. 发现冲突 conflict 提示
    15. 使用git status -sb 查看哪个/那些文件冲突
    16. git add/git commit/ [git pull] / git push 四连操作
    17. git clone 下载代码 /git pull 更新下载 / git push 上传
    18. git remote add origin git @xxxxxxx在本地添加远程仓库地址
    19. git push -u origin master 上传代码
    20. git push -u origin2 master 同时上传第二个代码

    git blame 相对路径 看代码当时写的时间
    image.png