git

 

  • git init,初始化,表示即将对当前文件夹进行版本控制。
  • git status,查看Git当前状态,如:那些文件被修改过、那些文件还未提交到版本库等。
  • git add 文件名,将指定文件添加到版本库的暂存状态。
  • git commit -m '提交信息',将暂存区的文件提交到版本库的分支。
  • git log,查看提交记录,即:历史版本记录
  • git config --local user.name ''
  • git config --local user.email''
  • git reset --hard 版本号
  • git remote add d2py https://github.com/wjsswt/d2py.git
  • git push d2py master # 将本地master分支内容以及版本信息推送到GitHub
  • git clone https://github.com/wjsswt/d2py.git # 将项目从GitHub中获取

 

  • git branch 分支名称 创建分支
  • git checkout 分支名称 切换分支
  • git branch -m 分支名称 创建并切换到指定分支
  • git branch 查看所有分支
  • git branch -d 分支名称 删除分支
  • git merge 分支名称 将指定分支合并到当前分支

 

posted @ 2019-01-11 08:33  swiftor  阅读(102)  评论(0编辑  收藏  举报