• git 记


    1. remote: The project you were looking for could not be found or you don't have permission to view it.
    2. fatal: repository 'http://xxx.xxx.com/xxx_tools/xxx-frontend.git/' not found

    问题1:remote: The project you were looking for could not be found or you don't have permission to view it.

    凡是问个为什么:因为全局认证未生效

    1. git config --global --list //查看是否配置
    2. git config --global user.name xxx //设置系统用户名和邮箱
    3. git config --global user.email xxx
    4. git config user.name userName //设置项目用户名和邮箱
    5. git config user.email email
    6. git config user.name 查看用户名


    解决方式:1、在http://增加 “用户名@”  ,yourusername改成自己gitLab的登陆名呦

    http://yourusername@github.com/your/repository.git

    基础命令:

    1. 设置系统用户名和邮箱
    2. git config --global user.name userName
    3. git config --global user.email email
    4. cat ~/.gitconfig //查看用户
    5. git clone http://github.com/your/repository.git 与远程仓库建立连接,clone仓库文件
    6. git init //初始化本地仓库
    7. git status //查看本地仓库状态
    8. git add . //将git仓库所在的文件夹下的所有内容添加到暂存区中
    9. git add 文件名 //将git仓库所在文件夹下的某个文件添加到暂存区中
    10. git rm --cached 文件名 //将某个文件从暂存区中删除
    11. git commit -m "注释" 文件名 //提交某个文件,并附带该次提交的版本信息。
    12. git commit -m "注释" . //提交所有文件。并附带此次提交的版本信息
    13. git rm 文件名 //从本地库中删除文件
    14. git reflog //查看历史命令。包括简单的版本信息,以及版本跳转
    15. git remote -v:可查询当前本地库连接的远程库
    16. git remote add 远程库别名(最好与本地库名称一致)远程库(http或者ssH密钥):将本地库与远程库连接
    17. git remote rm 远程库别名:取消本地库和远程库之间的连接关系
    18. git push 本地库别名 本地库分支:将本地库中的某个分支推送到远程库中
    19. git pull 远程库别名 远程库分支:将远程库分支上的内容拉取到当前本地库的分支上,并直接合并
    20. 查看分支
    21. git branch -v:查看当前存在的分支
    22. 创建分支
    23. git branch 分支名:创建分支
    24. 切换分支
    25. git checkout 分支名:切换到某个分支
    26. 删除分支
    27. git branch -d 分支名:删除指定分支

  • 相关阅读:
    DC综合 trip points问题
    I/O 模型学习笔记【全面理解BIO/NIO/AIO】
    AlphaFold2源码解析(7)--模型之Evoformer
    肝了30天,终于整出这份Java面试九大核心专题,收割4个大厂offer
    NuttX实时操作系统介绍(最详细)
    Autosar基本概念详细介绍
    报错——warning: ignoring JAVA_HOME=/home/jdk/jdk1.8.0_281; using bundled JDK
    猿创征文|瑞吉外卖——移动端_笔记
    十七.镜头知识之AA制程提高摄像头性能
    [附源码]Python计算机毕业设计Django校园招聘微信小程序
  • 原文地址:https://blog.csdn.net/github_34367377/article/details/139317461