On Tue, 13 Sep 2011 07:58:25 -0700 (PDT) er <[email protected]> wrote:
[...] > > > >> $ git checkout -b gh-pages origin/gh-pages > > > >> warning: unable to unlink > > > >> c_array/doc/html/c_array_HTML.manifest: Permission denied > > > >> warning: unable to unlink c_array/doc/html/index.html: > > > >> Permission denied > > > >> Branch gh-pages set up to track remote branch gh-pages from > > > >> origin. Switched to a new branch 'gh-pages' [...] > The warning talks about 'unlink'. I guess from your message it means > 'delete'. Your guess is correct: on POSIX systems, the syscall to delete a file is called "unlink" because filesystems which have POSIX semantics support hard links and so what you delete is not really a file but a link on it; the file is gone when the last link to it is deleted. > I hadn't realized fetch would attempt to 'delete' this sub- > folder. You appear to be confused. `git fetch` did not try to unlink anything, that's `git checkout` which did it--see above the output you yourself presented in your original message. And this is nothing strange for `git checkout`: if the work tree contains a file "foo" which is under version control (i.e. it is a part of a commit the work tree's state is based on) then when you attempt to switch the work tree to the state of another commit which does not contain that file "foo", `git checkout` will try to delete that file (which is absolutely logical). > The meaning of fetch seems quite removed from everyday > language (fetch a ball). What? `git fetch` fetches changes from a specified remote repository. I don't see any contradiction between the name of this command and its action. > Maybe it would be more safe to restore everything as it was before > $git fetch origin. Can I do this? I think the only really safe thing is to start from learning. As to restoring, I'd just delete the resulting project folder and re-cloned the repository. -- You received this message because you are subscribed to the Google Groups "Git for human beings" group. To post to this group, send email to [email protected]. To unsubscribe from this group, send email to [email protected]. For more options, visit this group at http://groups.google.com/group/git-users?hl=en.
