zoukankan      html  css  js  c++  java
  • git的初步学习

    git下载的网站(window)

    https://www.git-scm.com/download/win

    git类似svn的插件下载

    https://tortoisegit.org/

    git使用的基本的命令本地仓库

    1. 设置用户名
    git config --global user.name 'sanqianhuanyu'  
    
    2. 设置用户名邮箱
      git config --global user.email '12345677@qq.com'
    3.创建文件
      mkdir test
    4.初始化git
    cd test
    git init
    5.创建文件
    touch a1.php                         # 创建a1.php文件到工作目录
    git add a1.php                      # 添加a1.php到暂存区
    git commit -m  '第一次提交文件'     # 添加a1.php到仓库
    ---- 远程仓库
    

     git远程仓库

    https://github.com/sanqianhuanyu/Hello.git
    git config --list
    //下载
    git clone https://github.com/sanqianhuanyu/Hello.git
    touch a1.php                         # 创建a1.php文件到工作目录
    git add a1.php                      # 添加a1.php到暂存区
    git commit -m  '第一次提交文件'     # 添加a1.php到仓库
    --
    用户名和密码
    答案:私有项目,没有权限,输入用户名密码,或者远程地址采用这种类型:
    
    vi .git/config
    config中修改
    # 将
    [remote "origin"]  
        url = https://github.com/用户名/仓库名.git
    修改为:
    [remote "origin"]
        url = https://用户名:密码@github.com/用户名/仓库名.git
    

      

  • 相关阅读:
    Python 编码格式的使用
    解决cmd 运行python socket怎么终止运行
    解决win10子系统Ubuntu新装的mysql 不能root登陆方法
    浏览器中网址访问过程详解
    POJ 2502 最短路
    HDU 2859
    POJ 3186
    POJ 1661 暴力dp
    POJ 1015 陪审团问题
    CodeForces 1058E
  • 原文地址:https://www.cnblogs.com/liushisaonian/p/9343482.html
Copyright © 2011-2022 走看看