簡體   English   中英

git stash-沒有本地更改可保存但未跟蹤的文件

[英]git stash - No local changes to save but untracked files

我想存放一些未跟蹤的文件。 我試過了:

$ 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)

有什么建議么?

您需要隱藏未跟蹤的文件。 --include-untracked標志--include-untracked
或者,先Add然后隱藏。

$ git stash --include-untracked

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

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM