快速学习Git, Git学习总结, 常见问题

本文用于快速学习git

请使用 Chrome 浏览器, 并安装 MarkDown Preview Plus 扩展后查看本文档

多年 Git 使用心得 & 常见问题整理

https://juejin.cn/post/6844904191203213326

廖雪峰教程

  • 教程链接
  • 别名配置
  • 别名记录
    1
    2
    3
    4
    5
    6
    7
    8
    git config --global alias.cl clone
    git config --global alias.st status
    git config --global alias.co checkout
    git config --global alias.cm commit
    git config --global alias.br branch
    git config --global alias.last "log -1"
    git config --global alias.lg "log --color --graph --pretty=format:'%Cred%h%Creset -%C(yellow)%d%Creset %s %Cgreen(%cr) %C(bold blue)<%an>%Creset' --abbrev-commit"

服务端

推荐客户端(smartgit)

git-bash命令

  • 命令图解
    git命令图解
  • 常用命令
  • 文件夹操作
  • 常用快捷键
  • 快捷键
    1
    2
    3
    4
    5
    6
    7
    8
    9
    Ctrl + A  移动光标到整条命令的起始位置
    Ctrl + E 移动光标到整条命令的结束位置
    Ctrl + ← 移动光标到单词的左边
    Ctrl + → 移动光标到单词的右边
    Ctrl + U 删除光标左侧的所有内容
    Ctrl + K 删除光标右侧的所有内容
    Ctrl + L 清屏(与reset类似,但不清除已显示内容)
    移动命令 上(上一行)、下(下一行)、F(下一页)、B(上一页)、D(下半页)、U(上半页)、q(退出)
    其 他: Tab、上下