我的git默认文件夹是c:\ users \用户名\.git
我应该使用什么命令进入C:/project?
我的git默认文件夹是c:\ users \用户名\.git
我应该使用什么命令进入C:/project?
当前回答
以下是我遵循的步骤:
In bash, check in which directory you are by using the command: $ pwd copy the URL of the directory you want to go like after using the first command (PWD) I got: $ /c/Users/yourUsername Now I want to change this to the directory of c drive and folder MyPictures. To do that, I will go the directory of MyPictures, copy the URL, and paste it in the Git bash. However, before that: C:\MyPicture becomes $ cd /C/MyPicture (backslashes are replaced with slashes) if the folder name is having some spaces like (my program) then you need to enclose it in double quotes like: $ cd "C:\Program Files" Remember to change directory you just need to copy the requiredUrl and paste that in bash with double-quotes like: cd "required URL"
注意:URL需要斜杠。
其他回答
以下是我遵循的步骤:
In bash, check in which directory you are by using the command: $ pwd copy the URL of the directory you want to go like after using the first command (PWD) I got: $ /c/Users/yourUsername Now I want to change this to the directory of c drive and folder MyPictures. To do that, I will go the directory of MyPictures, copy the URL, and paste it in the Git bash. However, before that: C:\MyPicture becomes $ cd /C/MyPicture (backslashes are replaced with slashes) if the folder name is having some spaces like (my program) then you need to enclose it in double quotes like: $ cd "C:\Program Files" Remember to change directory you just need to copy the requiredUrl and paste that in bash with double-quotes like: cd "required URL"
注意:URL需要斜杠。
右键单击一个特定的文件夹可以帮助您减轻痛苦,而不是仅仅输入整个目录。右键点击s或右键点击“GIT bash here”
希望这对你有帮助
手动进入目录,右键单击→选择'Git bash'选项。
Git bash终端自动打开并显示指定目录。例如,进入您的项目文件夹。在文件夹中,右键单击并选择“Git bash”选项。它会自动打开/c/project。
如果你是在windows上,那么你可以在你想要使用git bash的文件夹中右键单击并选择“git bash HERE”。
从我的角度来看,实现目标的最快方法是改变“开始”的值。
要做到这一点,右键单击git-bash.exe,转到属性,并将开始值更改为您想要的文件夹。