![](/img/trans.png)
[英]Git checkout to a new branch does not refresh contents of index and working directory
[英]How to checkout the contents of a directory in git?
我有一個在其根目錄中帶有“ htdocs”目錄的存儲庫,是否可以僅檢出此文件夾的內容? 我嘗試跑步:
git checkout -f master -- htdocs
它確實會忽略存儲庫根目錄中的所有其他內容,但它還會htdocs
文件夾。 我可以復制內容並使用幾個附加命令刪除目錄,但是我想知道是否可以僅通過git使用。
您可以在外部文件夾中檢出,並在/ htdocs和該文件夾之間建立符號鏈接。
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.