git简单使用手册
介绍简单使用,以下命令均在 项目根目录 下执行
- clone代码
git clone https://justin.com/repo/testRepo.git
- 拉取代码
git pull --rebase
- 提交代码
git add .
git commit -m '自定义comment'
git push origin master - 删除错误代码
git rm delete.src
git add .
git commit -m 'comment'
git pus origin master - 查看当前状态
git status
- 查看所有分支
git branch -a
- 切换分支
git checkout $BanchName
- to be continued