克隆
sign in Gerrit》Projects》List》search by “projectTracker”》tab “General”》tab “clone with commit-msg hook” & “SSH” 》copy the command below the tab》run this command in the GIT command window
命令:第一组
检查仓库状态
$ git status
查看不同
$ git diff readme.txt
将修改添加到缓存区
$ git add readme.txt
将修改提交到仓库
$ git commit -m "add distributed"
总结:要随时掌握工作区的状态,使用git status命令。
命令:第二组
查看历史
$ git log
简约的历史
$ git log --pretty=oneline
撤销修改
场景1:当你改乱了工作区某个文件的内容,想直接丢弃工作区的修改时,用命令git checkout -- file。
本内容试读结束,登录后可阅读更多
下载后可阅读完整内容,剩余2页未读,立即下载