zoukankan      html  css  js  c++  java
  • git管理项目

    安装配置 git

    https://gitforwindows.org/
    github访问的速度慢
    https://cloud.tencent.com/developer/article/1426844
    原因:
    1. 初始访问 github.com 时网络寻址会比较耗费时间,这也是网站打开速度慢的其中一个原因
    2. DNS 寻址
    解决:
    映射文件存放于: C:WindowsSystem32driversetchosts
    # github related website
    192.30.253.113 github.com
    151.101.185.194 github.global.ssl.fastly.net
    192.30.253.118 gist.github.com
    192.30.253.120 codeload.github.com
    185.199.108.153 desktop.github.com  
    185.199.108.153 guides.github.com   
    185.199.108.153 blog.github.com 
    18.204.240.114 status.github.com   
    185.199.108.153 developer.github.com    
    185.199.108.153 services.github.com 
    192.30.253.175 enterprise.github.com   
    34.195.49.195 education.github.com    
    185.199.108.153 pages.github.com    
    34.196.237.103 classroom.github.com
    

    git clone 很慢

    管理git使用方式

    ssh

    1.关联密钥

    **测试有没有 一个公钥**
        $ cd ~/.ssh
        $ ls
    
        **生成公钥**
        $ ssh-keygen -t rsa -C "13290738@163.com"
    

    打开 id_rsa.put => 全选复制 
    

      

    2. copy git code

    git clone ssh(url) git@github.com:19960723/demo.git
    

    3. 上传仓库到远程

    1.(工作区) 添加到 (暂存区)
        git add README.md(添加的文件     . (所有的文件)
    2.(暂存区) 提交到 (本地仓库)
        git commit -m "提交描述"
    3. 和 github 的仓库连接
        git remote add origin git@github.com:1847426505/oiexi_admin.git
        git remote rm origin //删除连接
    4. 上传到github 远程仓库
        git push -u origin master
    
    ==> 错误
    
        $ git pull --rebase origin master  //先把远程仓库 pull 下来
        $ git push -u origin master
        或
        git push
  • 相关阅读:
    [hdu 2089] 不要62 数位dp|dfs 入门
    [poj 2456] Aggressive cows 二分
    NOIP 2016 DAY 1 爆炸记
    【模板】kmp
    【模板】LCA
    NOIP 之前的吐槽
    【模板】树状数组
    【模板】线段树
    【模板】高精度
    2016/11/15
  • 原文地址:https://www.cnblogs.com/linsxl/p/11703236.html
Copyright © 2011-2022 走看看