zoukankan      html  css  js  c++  java
  • git

    在centos上安装:

    yum install curl-devel expat-devel gettext-devel openssl-devel zlib-devel
    yum -y install git-core
    git --version

    配置个人的用户名称和电子邮件地址:

    git config --global user.name "cohen"
    git config --global user.email "123456@qq.com"

    git工作流程:

    工作区:能看到的目录

    暂存区:在.git 目录中有一个叫做 index 的暂存区,及Git自动为我们创建的分支master和指向master的一个指针叫HEAD

    版本库:工作区有一个隐藏目录.git,这个不算工作区,而是Git的版本库。

    git提交分两步:

      第一步,用git add 把文件添加进入,实际上是把文件添加到暂存区

      第二步,用git commit 提交更改,实际上是把暂存区的所有内容提交到当前分支,创建版本库时,Git默认创建了 master分支,

    因此git commit 就是往 master分支 上提交更改。更直白的理解是:提交的文件修改放在了暂存区,然后一次性提交暂存区的所有修改

    git init  生成版本仓库

    git status 查看状态

    git add   将工作区的文件提交到暂存区

    git  commit  -m   将暂存区的文件 提交到 Git 分支

    git diff   查看已写入缓存与已修改但尚未写入缓存的改动的区别

    退回到过去版本:

    git中当前版本用HEAD表示,上一个版本用HEAD^表示,上上个版本用HEAD^^表示,以此类推,为了简化,网上99个版本写成HEAD~99

    退回到上一个版本: git reset --hard HEAD~1

    回到指定版本:

    git reflog

    git reset --hard  版本ID号

  • 相关阅读:
    faster with MyISAM tables than with InnoDB or NDB tables
    w-BIG TABLE 1-toSMALLtable @-toMEMORY
    Indexing and Hashing
    MEMORY Storage Engine MEMORY Tables TEMPORARY TABLE max_heap_table_size
    controlling the variance of request response times and not just worrying about maximizing queries per second
    Variance
    Population Mean
    12.162s 1805.867s
    situations where MyISAM will be faster than InnoDB
    1920.154s 0.309s 30817
  • 原文地址:https://www.cnblogs.com/Cohen/p/8967860.html
Copyright © 2011-2022 走看看