在 Mac 上更改 Git 存储库下载路径
我经常从 Mac 上的终端使用 git 下载一些存储库,然后使用它。
当我使用这个命令时:
git clone git://git repository URL
repositories are downloaded in my Start folder (name account folder e.g. Matthew, if the name of my Mac account is Matthew).我想更改下载存储库的文件夹。
下载新的存储库时如何执行此操作?
谢谢,
马修
I often use git from Terminal on Mac to download some repositories and then use it.
When I use this command:
git clone git://git repository URL
repositories are downloaded in my Start folder (name account folder e.g. Matthew, if the name of my Mac account is Matthew).
I'd like to change this folder where repositories are downloaded.
How can I do this when I download a new repo?
Thanks,
Matthew
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
Git 将克隆的存储库放置在您当前所在路径中新创建的目录中(使用
pwd
检查)。如果您cd
到不同的路径,该目录将放置在那里。或者,您可以指定一个目录作为 git clone 命令的一部分。例如:
请参阅
git help clone
。Git places the cloned repository in a newly created directory in the path you are currently residing (check with
pwd
). If youcd
to a different path, the directory will be placed there.Alternatively, you can specify a directory as part of the
git clone
command. For example:See
git help clone
.