作者amnesia (记不住)
看板Soft_Job
标题[请益] git clone -n 可以没有.git吗
时间Wed Nov 22 16:15:32 2017
git --work-tree={aworktree} clone {remote-repo}.git
会把code放到 {aworktree}
然後版本相关的东西新建资料夹 {remote-repo} 放
想请问有没有git指令可以直接得到 {remote-repo} 里面的东西
而且不会一并下载 {aworktree}
试过 git -n 是最接近的,但是他会建立 .git 目录
然後我要的东西会在 .git 里面,tree像这样
{remote-repo}
+-- .git
+-- config
+-- Head
.....
有没有办法直接 .git 下的资料就在 {remote-repo} 没有.git资料夹呢?
感谢~
--
※ 发信站: 批踢踢实业坊(ptt.cc), 来自: 111.249.216.83
※ 文章网址: https://webptt.com/cn.aspx?n=bbs/Soft_Job/M.1511338535.A.460.html
1F:推 johnlinvc: clone --bare ? 11/22 16:31
3F:→ amnesia: 喔喔 对耶 so easy, tks! 11/22 17:19
4F:推 maxqq: good 11/22 17:56
5F:→ pttuser: gooooood 11/22 18:43
6F:→ windclara: very gooood! 11/22 19:09
7F:→ y3k: git clone {repo} && cd {repo_name} && rm -rf .git XD 11/22 22:09
8F:推 aszx4510: 楼上何必cd rm -rf {repo_name}/.git/ 11/23 01:51
9F:→ y3k: 应该是习惯问题 我clone之後都直接进去做事情了= =+ 11/23 12:39