Pergunta

I tried git integrated with xcode 4, but got problem on merge a branch back to master. When I develop new feature I create a new branch and add many new lib and files, the problem came when I want to merge this branch back to master. From my understanding I have to switch back to master and then merge feature-branch back to master, but when I tried to switch to master branch I got a lot of warning messages something like

The file for the document that was at /Users/...../file_name.m has disappeared. Do you want to re-save the document or close it? (three options, re-save, cancel, save-as)

What should I do so I can merge with no warning, do I need to add .gitignore to resolve this ?

Foi útil?

Solução

Two options:

  • either XCode4 consider the opened file problematic, since master branch doesn't contain that file yet (you haven't done the merge), so it (XCode4) proposes to close that file, or to re-create it in the new working directory (the one for master branch).

  • or you didn't committed that file yet, and Git, through XCode4, warns you about a file which might be lost when switching to master.
    Check your git status before switching branch: it should be clean.

Licenciado em: CC-BY-SA com atribuição
Não afiliado a StackOverflow
scroll top