网站有点儿久没有维护(因为去做其他事情了呗),现在空下来,回来改了网站的一些东西,却忘记了git的一些常用的命令,于是便写下这篇文,方便查阅,免得每次都去看手册(毕竟我懒啊!!) 检查当前文件状态:git status 跟踪新文件,暂存已修改文件:git add <file> 打带注释的标签:git tag -a <tag> -m "" 在历史版本上打标签:git tag -a <tag> 9fceb02 查看指定标签的版本信息:git show &…
cheat 是一个Unix命令行小工具,用来查询一些常用命令的惯用法(我们都知道,man page阅读起来太累了,常常是跳到最后去看 examples,但并不是所有man pages里面都有examples). 举个例子,输入 cheat tar ,它就显示如下图所示的内容: (图来自: Cheat - An Ultimate Command Line 'Cheat-Sheet' for Linux Beginners and Administrators ) 安装与使用: cheat 本身是用…
开场白:这里简单记录一些常用的bash命令,一则备忘,二来希望可以帮助别人解决一些问题. 1.检测文件是否存在 if [ -f ./foo.txt ] then echo the file exists fi 2. 检测目录是否存在 if [ -d ./test1 ] then echo the directory exists fi 3. 让高亮功能一直存在 androidyue@ubuntu:~/Desktop$ ls | grep s --color=always | more 4.使用c…