在.gitconfig中设置参数 [alias] pre = !cd 某个目录;然后能运行但是不会跳转到目录下,求解
習慣沉默
習慣沉默 2017-05-02 09:44:27
0
1
584

因为想快捷操作git;所以想用别名来解决结果无法实现:

然后再用 git pre 命令

并不会跳转到指定目录中

其他如 ls -a ;git pull等设置别名都没有问题
唯独 cd 命令不行……

習慣沉默
習慣沉默

reply all(1)
Ty80

git alias is its own process, cd in the child process will not affect the parent process (your shell)

You can write a shell function or shell alias

Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template
About us Disclaimer Sitemap
php.cn:Public welfare online PHP training,Help PHP learners grow quickly!