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

git 操作

时间:2019-05-01 01:12:18      阅读:100      评论:0      收藏:0      [点我收藏+]

标签:add   clone   one   -o   bsp   ash   stash   reset   set   

git add .      #添加全部文件到暂存区 ,git add file,

git commit -m "信息"  

git ls-files -s 查看暂存区文件

git ls-tree  master   查看master 分区 文件

git rm file 删除工作目录,跟暂存区文件。

git checkout  --file 从本地版本库下载文件覆盖暂存区,工作 目录,git checkout  。  从版本库覆盖所有暂存区,工作目录文件

git reset --hard 版本号  还原之前版本。

git reflog  列举历史版本

git stash 暂存状态, git stash pop     git stash drop

git log --online 

git branch  name  创建分支name

git checkout name  切换分支name

git checkout -b name 创建分区并切换到name

git push 

git pull

git clone

 

git 操作

标签:add   clone   one   -o   bsp   ash   stash   reset   set   

原文地址:https://www.cnblogs.com/libing029/p/10798783.html

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