2013-06-02 16 views
10

ho recuperato alcuni aggiornamenti da monte, si è fusa, ed ha ottenuto il seguente messaggio di errore:DIRTY_INDEX a merge

FAILED: DIRTY_INDEX [filename] 

Dopo un reset e un altro si fondono, ottengo questo errore:

FAILED: DIRTY_WORKTREE [another-filename] 

Tutto questo è criptico per me - cosa dovrei fare ora?

+1

Aggiungi cosa restituisce 'git status'. – cforbish

risposta

10

Come menzionato ed in "Fun with keeping local changes around":

Linus often performs patch applications and merges in a dirty work tree with a clean index.

  • A dirty work tree is where you have changes that are not added to the index.
    A work tree that is not dirty is a clean work tree.
  • A dirty index is where you have changes already added to it (in other words, " git diff --cached " will report some changes).
    A clean index matches the HEAD .

Ogni volta, git status in grado di visualizzare ciò che è necessario fare prima di essere in grado di fare una nuova unione.

git stash, ad esempio, è possibile salvare i lavori in corso nel proprio albero di lavoro e git stash pop applicherà detto lavoro una volta completata l'unione.