postgres
1 | sudo docker pull postgres |
1 | # login |
useful command
1 | sudo docker run --name postgres-tim -e POSTGRES_USER=timqian -p 5432:5432 -d postgres |
当白云悠然褪去我已等不及登上高山仰望西方的天空但最美的不是夕阳是夜色如水月色流离
1 | sudo docker pull postgres |
1 | # login |
1 | sudo docker run --name postgres-tim -e POSTGRES_USER=timqian -p 5432:5432 -d postgres |
hello-world/
├── Dockerfile
├── index.js
├── package.json
1 | FROM node:8-alpine |
ref:https://nodejs.org/en/docs/guides/nodejs-docker-webapp/
1 | sudo docker build -t liuliaixue/nodejs-hello-world . |
1 | # sudo docker pull mysql |
1 | sudo apt-get install mysql-client-core-5.7 |
Welcome to Hexo! This is your very first post. Check documentation for more info. If you get any problems when using Hexo, you can find the answer in troubleshooting or you can ask me on GitHub.
1 | $ hexo new "My New Post" |
More info: Writing
1 | $ hexo server |
More info: Server
1 | $ hexo generate |
More info: Generating
1 | $ hexo deploy |
More info: Deployment
1 | # create a new file |
require 会优先从cache中读取文件
1 | /* add.js*/ |
git tree
新建git tree命令来显示commit 树状图1
git config --global alias.tree "log --color --graph --pretty=format:'%Cred%h%Creset -%C(yellow)%d%Creset %s %Cgreen(%cr) %C(bold blue)<%an>%Creset' --abbrev-commit"
如果已经命名会提示加上 –replace-all1
git config --replace-all --global alias.tree "log --color --graph --pretty=format:'%Cred%h%Creset -%C(yellow)%d%Creset %s %Cgreen(%cr) %C(bold blue)<%an>%Creset' --abbrev-commit"
#
比如当我们Git revert的时候,
git revert
Git会抱怨:
is a merge but no -m option was given
这是因为你revert的那个commit是一个merge commit,它有两个parent, Git不知道base是选哪个parent,就没法diff,所以就抱怨了,所以你要显示告诉Git用哪一个parent。
git revert sidsad8 -m 1
这样就选parent 1,那么parent 1又是哪一个呢?
一般来说,如果你在master上mergezhc_branch,那么parent 1就是master,parent 2就是zhc_branch.
Often this will be parent number one, for example if you were on master and did git merge unwanted and then decided to revert the merge of unwanted. The first parent would be your pre-merge master branch and the second parent would be the tip of unwanted.
上一篇:三分钟教你学Git(十九) - 全局,用户,仓库作用域的配置文件
原文:http://blog.csdn.net/hongchangfirst/article/details/49472913
作者:hongchangfirst
hongchangfirst的主页:http://blog.csdn.net/hongchangfirst
git rebase
git rebase 是用来合并分支的。会把当前分支的提交作为补丁,一个一个应用在作为base的分支上面。
如果有冲突,需要解决冲突然后重新提交,然后1
2git add _file
git rebase --contune
比如1
2
3
4
5
6
7
8
9
10
11
12
13
14git checkout master
git add master1.txt
git commit -a -m 'commit master1.txt'
git checkout rebase
git add rebase1.txt
git commit -a -m 'commit rebase1.txt'
git checkout master
git add master2.txt
git commit -a -m 'commit master2.txt'
git checkout rebase
git rebase master
结果是自动合并,并回到 branch rebase,注意commit的顺序,rebase上的commit都在master的后面1
2
3
4
5//git log
commit rebase1.txt
commit master2.txt
commit master1.txt