码迷,mamicode.com
首页 > 其他好文 > 详细

git常用命令及作用

时间:2019-07-24 22:23:43      阅读:151      评论:0      收藏:0      [点我收藏+]

标签:for   master   历史命令   ocs   ast   file   --   git push   ash   

主要的几个命令

git add # 将工作区的修改提交到暂存区
git commit # 将暂存区的修改提交到当前分支
git reset # 回退到某一个版本
git stash # 保存某次修改
git pull # 从远程更新代码
git push # 将本地代码更新到远程分支上
git reflog # 查看历史命令
git status # 查看当前仓库的状态
git diff # 查看修改
git log # 查看提交历史
git revert # 回退某个修改

使用的命令 git archive

文档在 http://git-scm.com/docs/git-archive

简单的用法就是

git archive --format zip --output /path/to/file.zip master # 将 master 以zip格式打包到指定文件

 

git常用命令及作用

标签:for   master   历史命令   ocs   ast   file   --   git push   ash   

原文地址:https://www.cnblogs.com/tyadmin/p/11241213.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!