nginx的配置其实很简单,总共也就分为4部分:main(全局设置)、server(主机设置)、upstream(负载均衡服务器设置)和 location(URL匹配特定位置的设置) 他们的关系是,server继承main,location继承server,upstream既不会继承其他设置也不会被继承。 所以配置的优先级就是 location > server > main
最近发生了奇怪的事情,mysql总是会连不上,查了半天原因,最后发现进程文件没有生成。es报警“Too many open files”。搜索才发现是,打开文件太多了,超过了限制。解决方法是修改/etc/security/limits.conf。另外还牵扯到了另一个配置file-max。经过调试还是踩了不少坑的。坐下笔记,防止重复踩坑。
$ git reset --mixed HEAD^ Unstaged changes after reset: M test.txt $ git log commit b5a6d3a6c4d4f5899645f9469f116b050c9426b5 (HEAD -> master) Author: shooke <xingjiehu@163.com> Date: Wed Mar 18 16:41:55 2020 +0800
1
“历史回退了”小白说 “恩,咱们看看文件状态有什么变化”老鸟说
1 2 3 4 5 6 7 8 9 10
$ git status On branch master Changes not staged for commit: (use "git add <file>..." to update what will be committed) (use "git checkout -- <file>..." to discard changes in working directory)
modified: test.txt
no changes added to commit (use "git add" and/or "git commit -a")
Untracked files: (use "git add <file>..." to include in what will be committed)
我最帅.txt
nothing added to commit but untracked files present (use "git add" to track)
Untracked files列出的是新建的文件,还没有被add和commit过,所以提示你(use "git add <file>..." to include in what will be committed),这表示需要进行git add操作
1 2 3 4 5 6 7 8 9
$ git status On branch master Changes not staged for commit: (use "git add <file>..." to update what will be committed) (use "git checkout -- <file>..." to discard changes in working directory)
modified: readme.md
no changes added to commit (use "git add" and/or "git commit -a")
Changes not staged for commit列出被修改的文件,这时候文件还没有被add和commit。这时就是比较工作区和HEAD得出的结果。modified: readme.md意思是这个文件发生了更改。
# 已经执行过`git add`但没有执行`git commit` Changes to be committed: # 可执行的命令,reset会移除暂存区记录,移除后需要重新进行add (use "git reset HEAD <file>..." to unstage)
renamed: 我最帅.txt -> wo.txt
# 文件发生修改时提示 Changes not staged for commit: # 可以执行的命令,文件修改是可以执行add加入到暂存区,也可以checkout进行撤销 (use "git add <file>..." to update what will be committed) (use "git checkout -- <file>..." to discard changes in working directory)
modified: readme.md
# 新增文件时提示 Untracked files: # 可以执行的命令,新增文件只要add到 (use "git add <file>..." to include in what will be committed)
我很帅.txt
no changes added to commit (use "git add" and/or "git commit -a")
$ git status On branch master Changes not staged for commit: (use "git add <file>..." to update what will be committed) (use "git checkout -- <file>..." to discard changes in working directory)
modified: readme.md
no changes added to commit (use "git add" and/or "git commit -a")