0
我在同一時間處理兩個任務:編寫一些代碼並將我的工作樹的文件夾作爲子模塊。當我切換任務時,我只需git stash save
我的修改文件。問題是我的修改文件現在是新子模塊的一部分。Appliy git stash彈出到新的子模塊
,當我嘗試到頂部的文件夾做一個git stash pop
,我得到了很多的衝突
$ git stash pop
error: refusing to lose untracked file at 'folder/file1'
error: refusing to lose untracked file at 'folder/file2'
[and so on]
CONFLICT (modify/delete): [folder]/file1 deleted in Updated upstream and modified in Stashed changes. Version Stashed changes of [folder]/file1 left in tree.
CONFLICT (modify/delete): [folder]/file2 deleted in Updated upstream and modified in Stashed changes. Version Stashed changes of [folder]/file2 left in tree.
[and so on]
CONFLICT (file/directory): There is a directory with name [folder] in Stashed changes. Adding [folder] as [folder]~Updated upstream
其中[文件夾]是上一個文件夾/新的子模塊
我做了一個乾淨的克隆的完整回購和新的子模塊沒有問題。
有沒有辦法將存儲轉移到子模塊?或者在隱藏文件中獲取文件並在子模塊中手動合併它們?
Git有時候是很痛苦的。 – Rolf