2017-02-20 85 views
0

我想隱藏一些未追蹤的文件。我想:git隱藏 - 沒有保存但未跟蹤文件的本地更改

$ git stash 

這給

No local changes to save 

運行git status給出:

$ git status 
On branch develop 
Your branch is up-to-date with 'origin/develop'. 
Untracked files: 
    (use "git add <file>..." to include in what will be committed) 

    dir/ 

nothing added to commit but untracked files present (use "git add" to track) 

有什麼建議?

+2

[你如何藏匿未跟蹤文件?(http://stackoverflow.com/questions/835501/how-do-you-stash-an-untracked-file) –

回答

1

您需要存儲未跟蹤的文件。與--include-untracked藏起來。
或者,Add首先,然後存儲。

$ git stash --include-untracked 

OR, 
$ git add .  # add untracked files 
$ git stash 
+0

注意可能的複製,一個包含未跟蹤文件的存儲可能很難在以後恢復(應該這樣做)。 – torek

相關問題