#shell

if -e and -n的意思?

如果目标不为 null 则返回 true
-e returns true if the target exists. Doesn't matter if it's a file, pipe, special device, whatever. The only condition where something may exist, and -e will return false is in the case of a broken symlink.

文件出现 ^M 问题

^M 是回车符,他是源于 DOS/Windows 的,但是在 Unix 的系统中这样的符号在执行的时候会报错,在使用 vim 查看文件的时候会直接看到^M 而不是换行。

想替换掉^M,换成\r或者\n, 千万不要直接打上符号^M 进行替换,^M 这个符号要使用 ctrl+v & ctrl+m 生成,在 vim 中使用

:%s/^M/\r/g

进行替换所有回车符。

SourceTree是什么?

简单来说SourceTree是一款免费git图形化操作软件,功能很全,使用起来非常方便,相信不少开发者已经在使用这款软件。

具体还是来看看网上的介绍:

SourceTree是Windows 和Mac OS X 下免费的Git 和Hg 客户端,拥有可视化界面,容易上手操作。 同时它也是Mercurial和Subversion版本控制系统工具。 支持创建、提交、clone、push、pull 和merge等操作。