I'm using git bash and let say i have 2 folders: C:/folder1 and C:/folder2, I'd like to make fast cd from one to another.
I've tried git.alias but it seems to work for "git ..." commands only.. and I'm not very familiar with all this bash stuff.. so how should I do that?
just right click on the desired folder and select git-bash Here option it will direct you to that folder and start working hope it will work. Show activity on this post. if you are on windows then you can do a right click from the folder where you want to use git bash and select "GIT BASH HERE".
A Git alias can be either local or global. A local alias is defined for a particular git repository whereas a global alias can be used in any repository. If you create an alias inside a git repository without the global flag, then the alias will be local by default i.e. it can be used in the current repository only.
In bash you could do the following to create alias:
alias cdf1="cd /user/home/cloudera"
cd /user
cdf1
pwd
You will get result of pwd as /user/home/cloudera. You could do the same in git-bash prompt as well with directory as "C:/folder1" instead of "/user/home/cloudera".
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With