Git 命令

git status  显示工作树上的状态
git add file 把改动加到缓存
git commit 提交文件到本地库 加-m “提交信息”
git reset --hard (ID) 撤消该ID相应的操作
git push 将本地库更新到上级库
git reset HEAD benchmarks.rb 取消已暂存的文件benchmarks.rb
git checkout -- benchmarks.rb 取消对文件的修改(请务必确定真的不再需要保留刚才的修改)

git pull -h 显示有关pull的命令
git pull --help 打开有git-pull.html页面
posted @ 2014-02-13 18:11  leerone  Views(258)  Comments(0Edit  收藏  举报