zoukankan      html  css  js  c++  java
  • git常用命令

    1.git init(初始化);

    2.git clone ssh地址(克隆ssh地址);

    3.git add.(添加全部文件);

    4.git add /文件路径(添加指定文件);

    5.git commit -m '注释说明'(提交暂存区);

    6.git remote add origin ssh地址 (如未克隆添加仓库连接地址);

    7.git pull origin master(拉取分支上的代码);

    8.git push -u origin master(线上分支推送);

    9.git branch -a(查看全部分支)

    10.git branch master(创建分支);

    11.git checkout master(切换分支);

    12.git checkout -b master(创建并切换分支);

    13.git push origin master:master (创建远程分支);

    14.git log(查看所有提交过的版本信息);

    15.git reflog(查看所有提交过的版本信息并可查看已被删除或回滚信息);

    16.git status(查看状态信息);

    17.git branch -d master(删除分支);

    18.git checkout --filename(撤销修改);

    19.git reset --head “commit节点”(回滚提交);

    20.git config --list(查看git配置信息);

    21.git config --global user.name "name"(全局设置用户名);

    22.git config --global user.email "email@163.com"(全局设置邮箱);

  • 相关阅读:
    MSSQL
    Dapper
    Asynchronous Programming
    PHP on CentOS (LAMP) and wordpress
    CSS
    TypeScript & JavaScript
    AngularJS 2.0
    ReadMe.md MarkDown file
    shortcuts on Windows and MacOS
    移动平台的meta标签
  • 原文地址:https://www.cnblogs.com/miaozhihang/p/11813957.html
Copyright © 2011-2022 走看看