How to set aliases in the Git Bash for Windows?

后端 未结 8 1695
渐次进展
渐次进展 2021-01-29 19:34

How to alias command in Git Bash for Windows downloaded from git-scm.com ?

I mean Bash commands not Git.

(windows7)


Edit:

Writing aliases i

8条回答
  •  感情败类
    2021-01-29 20:07

    • Go to: C:\Users\ [youruserdirectory] \bash_profile

    • In your bash_profile file type - alias desk='cd " [DIRECTORY LOCATION] "'

    • Refresh your User directory where the bash_profile file exists then reopen your CMD or Git Bash window

    Type in desk to see if you get to the Desktop location or the location you want in the "DIRECTORY LOCATION" area above

    Note: [ desk ] can be what ever name that you choose and should get you to the location you want to get to when typed in the CMD window.

提交回复
热议问题