[請益] git clone -n 可以沒有.git嗎

看板Soft_Job作者 (記不住)時間8年前 (2017/11/22 16:15), 編輯推噓3(306)
留言9則, 7人參與, 8年前最新討論串1/1
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

11/22 16:31, 8年前 , 1F
clone --bare ?
11/22 16:31, 1F

11/22 16:32, 8年前 , 2F

11/22 17:19, 8年前 , 3F
喔喔 對耶 so easy, tks!
11/22 17:19, 3F

11/22 17:56, 8年前 , 4F
good
11/22 17:56, 4F

11/22 18:43, 8年前 , 5F
gooooood
11/22 18:43, 5F

11/22 19:09, 8年前 , 6F
very gooood!
11/22 19:09, 6F

11/22 22:09, 8年前 , 7F
git clone {repo} && cd {repo_name} && rm -rf .git XD
11/22 22:09, 7F

11/23 01:51, 8年前 , 8F
樓上何必cd rm -rf {repo_name}/.git/
11/23 01:51, 8F

11/23 12:39, 8年前 , 9F
應該是習慣問題 我clone之後都直接進去做事情了= =+
11/23 12:39, 9F
文章代碼(AID): #1Q5J8dHW (Soft_Job)