看板 Soft_Job 關於我們 聯絡資訊
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://www.ptt.cc/bbs/Soft_Job/M.1511338535.A.460.html
johnlinvc: clone --bare ? 11/22 16:31
amnesia: 喔喔 對耶 so easy, tks! 11/22 17:19
maxqq: good 11/22 17:56
pttuser: gooooood 11/22 18:43
windclara: very gooood! 11/22 19:09
y3k: git clone {repo} && cd {repo_name} && rm -rf .git XD 11/22 22:09
aszx4510: 樓上何必cd rm -rf {repo_name}/.git/ 11/23 01:51
y3k: 應該是習慣問題 我clone之後都直接進去做事情了= =+ 11/23 12:39