GIT基本命令简介

okokyu 2016-01-29

  • init       Create an empty git repository or reinitialize an existing one创建或者重新初始化一个仓库
  • add        Add file contents to the index添加新文件(目录)到 Git 代码仓库的索引中
  • rm         Remove files from the working tree and from the index 从仓库中删除一个文件
  •  mv         Move or rename a file, a directory, or a symlink 从仓库中移动或重命名一个文件
  • commit     Record changes to the repository 提交修改到本地仓库
  • diff       Show changes between commits, commit and working tree, etc 查看自上次提交(commit)以来,本地文件改动的具体情况
  • log        Show commit logs 查看历次提交
  • revertRevert some existing commits 还原已提交的修改
  • clone      Clone a repository into a new directory 克隆一个仓库到新的目录下
  • status     Show the working tree status 目前仓库状态,和上次对比是否有更新 删除
  • checkout   Checkout a branch or paths to the working tree 查看某个分支

相关推荐

好脑筋不如烂笔头 / 0评论 2016-11-22