Set parameters in .gitconfig [alias] pre = !cd a certain directory; then it can run but will not jump to the directory. Solve
習慣沉默
習慣沉默 2017-05-02 09:44:27
0
1
658

Because I want to operate git quickly; so I want to use aliases to solve the problem. The result cannot be achieved:

Then use the git pre command

It will not jump to the specified directory

Others such as ls -a; git pull, etc. have no problem setting aliases
Only the cd command does not work...

習慣沉默
習慣沉默

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