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

Git的基本使用

时间:2018-12-04 17:18:20      阅读:195      评论:0      收藏:0      [点我收藏+]

标签:最新版本   使用   push   strong   status   克隆   最新版   仓库   版本   


Git的基本使用

1.创建仓库
  登陆github帐号,创建远程仓库
  同步到本地
  生成key:
    ssh-keygen
    cat ~/.ssh/id_rsa.pub 将密钥复制到帐号的key
    git clone ---》克隆到本地仓库

基本使用命令
  git add .---->追踪
  git commit -m "备注" ---->提交到仓库
  git push ---->提交到远程仓库
  git pull ---->下载到本地仓库
  git status ---->查看仓库状态
  git log ----->查看仓库日志(id)
  git reset --hard id ----->切换到指定版本
  git reflog ----->查看最新版本日志
  git rm ----->删除

 

Git的基本使用

标签:最新版本   使用   push   strong   status   克隆   最新版   仓库   版本   

原文地址:https://www.cnblogs.com/Qingxiaoyu/p/10064590.html

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