• Git


    常用Git命令

    一定要进入目标文件内进行操作,目标文件内如果有.git,不要在进行git init初始化

    在git bash中输入命添加 ssh key

    $ ssh-keygen -t rsa -C "youremail@example.com"       
    

    新建版本库

    git init       
    

    查询repo状态

    git status      
    

    查看当前主干下有哪些分支

    git branch -a      
    

    从github上下载:

    git clone git@github.com:fast-cache/fast-cache.git       
    

    列出当前文件夹内的文件

    ls或者ll   
    

    查看修改当前用户名和邮箱

    cd fast-cache
    git config user.name ['fast-cache']
    git config user.email ['fast-cache@github.com' ] 在项目中修改当前git用户名和邮箱,使其和GitHub的一致。
    

    线上库和线下库合并

    git pull  
    

    提交到GitHub

    git add .
    git commit -m "first update"
    git push origin master      
    

    git回滚到某个版本

    git reset --hard 某个版本号          
    
  • 相关阅读:
    浏览器
    背景图片设置
    用CSS画平行四边形
    git常用操作
    函数Function
    Object类型的创建和访问
    执行环境及作用域
    传值和传引用
    String类型
    HTML< legend >标签
  • 原文地址:https://www.cnblogs.com/louisduan66/p/10666488.html
Copyright © 2020-2023  润新知