• git 学习笔记


    git clone下载

    git clone下载遇到报错如下
    Host key verification failed.
    fatal: Could not read from remote repository.
    Please make sure you have the correct access rights
    and the repository exists.

    linxh@server:~/test$ git clone git@172.16.3.207:lbl_test.git
    Cloning into 'lbl_test'...
    The authenticity of host '172.16.3.207 (172.16.3.207)' can't be established.
    ECDSA key fingerprint is xx:xx:xx:xx:xx:xx:xx:xx:xx:xx:xx:xx:xx:xx:xx:xx.
    Are you sure you want to continue connecting (yes/no)? 
    Host key verification failed.
    fatal: Could not read from remote repository.
    
    Please make sure you have the correct access rights
    and the repository exists.
    
    • 1
    • 2
    • 3
    • 4
    • 5
    • 6
    • 7
    • 8
    • 9
    • 10

    在这里插入图片描述

    在Are you sure you want to continue connecting (yes/no)处打上yes即可

    linxh@server:~/test$ git clone git@172.16.3.207:lbl_test.git
    Cloning into 'lbl_test'...
    The authenticity of host '172.16.3.207 (172.16.3.207)' can't be established.
    ECDSA key fingerprint is xx:xx:xx:xx:xx:xx:xx:xx:xx:xx:xx:xx:xx:xx:xx:xx.
    Are you sure you want to continue connecting (yes/no)? yes
    Warning: Permanently added '172.16.3.207' (ECDSA) to the list of known hosts.
    remote: Counting objects: 8, done.
    remote: Compressing objects: 100% (5/5), done.
    remote: Total 8 (delta 1), reused 0 (delta 0)
    Receiving objects: 100% (8/8), done.
    Resolving deltas: 100% (1/1), done.
    Checking connectivity... done.
    
    • 1
    • 2
    • 3
    • 4
    • 5
    • 6
    • 7
    • 8
    • 9
    • 10
    • 11
    • 12

    在这里插入图片描述

    git status 查看现状

    查看仓库当前的状态,显示有变更的文件。

    linxh@server:~/test/lbl_test$ git status
    On branch master
    Your branch is up-to-date with 'origin/master'.
    
    nothing to commit, working directory clean
    
    • 1
    • 2
    • 3
    • 4
    • 5

    在这里插入图片描述

    添加一个新文件“lxh.txt”,git status如下

    linxh@server:~/test/lbl_test$ git status
    On branch master
    Your branch is up-to-date with 'origin/master'.
    
    Untracked files:
      (use "git add ..." to include in what will be committed)
    
    	lxh.txt
    
    nothing added to commit but untracked files present (use "git add" to track)
    
    • 1
    • 2
    • 3
    • 4
    • 5
    • 6
    • 7
    • 8
    • 9
    • 10

    在这里插入图片描述

    git add 后如下

    linxh@server:~/test/lbl_test$ git add --all
    linxh@server:~/test/lbl_test$ git status
    On branch master
    Your branch is up-to-date with 'origin/master'.
    
    Changes to be committed:
      (use "git reset HEAD ..." to unstage)
    
    	new file:   lxh.txt
    
    
    • 1
    • 2
    • 3
    • 4
    • 5
    • 6
    • 7
    • 8
    • 9
    • 10

    在这里插入图片描述

  • 相关阅读:
    在vue的v-for中,key为什么不能用index?
    Java《图书管理系统》练习
    【面试普通人VS高手系列】Redis和Mysql如何保证数据一致性
    mac的m1芯片安装nvm踩坑完全版
    深入浅出Redis,这是我见过最好的Redis实践文档(PDF文档)
    连搜索、地图、网盘都要重构了?百度这次玩得有点大
    Android项目启动处于loading状态, 无法正常加载目录结构
    大厂基本功 | MySQL 三大日志 ( binlog、redo log 和 undo log ) 的作用?
    2023.10.26-SQL测试题
    7-3 成绩等级
  • 原文地址:https://blog.csdn.net/weixin_45208598/article/details/128180723