配置

  • 设置Linux格式:git config --global core.autocrlf input
  • 增加git bash的命令可读性:git config --global color.ui auto

    仓库

  • 克隆仓库:git clone [url]

    分支相关

  • 更新分支:git pull

  • 查看分支:git branch -av
  • 删除分支:git branch -D [branch-name]
  • 切换分支:git checkout [branch-name]
  • 创建分支:git checkout -b [new-branch-name] [base-branch-name]
  • 还原分支:git reset --hard [version]

    储藏区相关