On Nov 29, 2011, at 9:34 AM, Marcus Karlsson wrote: --On November 28, 2011 11:51:43 AM +1300 Phillip Hutchings <email@hidden> wrote:
(This seems very surprising to me. Shouldn't Git just assume that I
intended to remove a missing item, maybe with a warning? Otherwise, I'm
just stuck, and worried that if I do the wrong thing I'll lose all my
source.)
No, Git never assumes anything, every move, add, and delete has to be
manually staged. The easiest way in my experience is just to launch git
gui via the command line and stage the deletions. You can also do this
via the command line by running git status and then git rm over each path
you see as deleted, but git gui is the easiest.
An even quicker way is to run git add -u.
I tried that and a number of other things recommended on-list and off-list, and none of them worked. In every case, Xcode put up an alert sheet saying that my subsequent commit failed because the contents of the old Help folder could not be found. I spent a lot of time reading online Git tutorials, to no avail. The one thing I did not try is any of the Git GUI applications, which people keep telling me will solve all problems -- but I am dubious.
I ended up simply removing the .git folder from the project folder and deleting the repository links in Xcode's repositories pane. I had reached a milestone on this project, and as a solo developer the commit history is not particularly important.
My experience with Git is recent and limited to the Xcode 4 interface. I must say that this incident leaves me feeling that version control is way more trouble than it's worth to me. I'm still using it (I just inited a new repository for this project), but I am anxious about the next glitch that will make the repository inaccessible and unusable again. The time required to become familiar and comfortable with the complexity of Git is too big a burden for me. I'm a full time trial lawyer and a full time Mac software developer, with a family too, and I simply have to set priorities and stick to them. Learning a version control system is way, way down on the list. |