克隆github项目
1、 选择目标文件夹,进入git bash
2、 git init
3、 git clone https://github.com/Tencent/Shadow.git
克隆github项目
git clone https://github.com/material-components/material-components-flutter-codelabs.git
cd material-components-flutter-Codelabs
git checkout 101-starter
检出远程git仓库里的指定分支
git checkout -b todo-mvp origin/todo-mvp
git checkout -b todo-mvp-clean remotes/origin/todo-mvp-clean
删除分支
git branch -d origin/todo-mvp
将单个文件恢复到历史版本
git reset commit_id 文件路径
git checkout -- 文件路径
git stash
git stash -m "messeag"
git stash push -m "messeag"
恢复改动
git stash pop stash@{id} 执行后将对应的stash id 从stash list里删除
git stash apply stash@{id} 执行会继续保存stash id
git stash apply stash@{0}
git stash list