Git 操作的一些常用命令

求: 我要下载这个版本的代码到当前目录下,不要创建yibao-ui目录

改进下这句

git clone –branch v1.0.0 –depth=1 –no-checkout https://{repository_url} && git sparse-checkout init –cone && git sparse-checkout set {your_folder_path} 我要下载这个版本的代码到当前目录下,不要创建yibao-ui目录

好的,那么可以这样改进这段命令:

git clone –branch v1.0.0 –depth=1 –no-checkout https://{repository_url} . && git sparse-checkout init –cone && git sparse-checkout set {your_folder_path} 这里使用了 . 表示当前目录,也就是代表将代码下载到当前目录下而不是新建一个名为 yibao-ui 的目录。

git clone –branch v1.0.0 –depth=1 http://guest:123456@192.168.1.109:3008/Ta404ManageFrontUI_Temp_Libs/yibao-ui.git . && git sparse-checkout init –cone && git sparse-checkout set yibao-ui

updatedupdated2023-06-092023-06-09