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 ?
Two options:
either XCode4 consider the opened file problematic, since
masterbranch 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 formasterbranch).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 statusbefore switching branch: it should be clean.