zoukankan      html  css  js  c++  java
  • Git 常用命令 和 安装

                这年头不会点git还真不能与别人进行代码交流

     安装

      windowns版下载:https://git-scm.com/download/win ,下载完成后就自己手动安装 ,很简单就不多说。

      Ubuntu版:直接在命令行实行apt-get install git , 他自己结束

    命令

      shh-keygen -t  rsa -C  "自己GitHub上邮箱地址"    # 创建密钥,   然后自己将密钥放到自己GitHub上

      git clone git@github.com:账号名/项目名.git   # 连接项目  下载到本地

       git config  -- global user.name '自己名字'   # 设置上传名

     ps: 如上图就是git的工作流程图

      

      git add file   # 将file加入暂存区
      git commit -m '创建hello.txt'   # 提交到仓库 后面是说明
     
      git log     # 查看历史记录
      git status    # 查看暂存区信息

      git reset HEAD^^^   # 将仓库回到缓存中 ^是要恢复的版本 最近HEAD
      git checkout hello.txt   # 将缓存中把hello.txt的数据恢复回来

      git pull      # 从GitHub下拉到本地
      git push origin master    # 从仓库上传到GitHub

     

    此时此刻,非我莫属
  • 相关阅读:
    make ubuntu desktop beautiful
    scratch 编程第二弹
    stratch pragramming
    emacs 安装与基本设置-1
    linux相关命令
    7-12
    python strip()
    python 正则表达式 re.sub & re.subn
    python 正则表达式 re.findall &re.finditer
    python 正则表达式 re.split
  • 原文地址:https://www.cnblogs.com/taozhengquan/p/10122213.html
Copyright © 2011-2022 走看看