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

Git操作命令

时间:2019-12-16 09:19:50      阅读:99      评论:0      收藏:0      [点我收藏+]

标签:dir   one   origin   cached   git   comm   xxx   本地   指定   

  • 推送拉取在Github操作

    git 添加操作

  • git 添加到暂存区
git add */./文件名
  • git 提交版本库
git commit -m '注释'
  • git 推送到远程仓库
git push origin 仓库

git 拉取操作

  • 克隆
git clone 地址

git clone -b 分支名  地址

git checkout xxx 切换分支
git checkout -b xxx 切换分支或创建分支

git status 查看分支

git 合并

git merge 分支名

git 删除

dir    # 查看所有内容
git rm -r --cached readme3.md   # 删除指定的文件
git commit -m '删除readme3'     # 提交到本地仓库,删除
git push -u origin three_mas    # 推送到指定的仓库进行删除 

Git操作命令

标签:dir   one   origin   cached   git   comm   xxx   本地   指定   

原文地址:https://www.cnblogs.com/xinzaiyuan/p/12045891.html

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