I've just got around to noticing some of the new (to
me) features in git, and started experimenting with

I see that when I switch view to a different
branch with:

        $ git checkout -f someoldbranch

that any files that exist in my previous branch view
but not in "someoldbranch" are not deleted.  I can
find and remove them easily with:

        $ git-ls-files --others | xargs rm -f

but I wondered whether this was a deliberate choice
(to avoid clobbering .o files etc. for people who
have run a make in their tree).

Currently git-ls-files doesn't have a way to specify
a branch ... but it it did, the something like:

        comm -1 <(git-ls-files -b oldbranch) \
                  <(git-ls-files -b newbranch) | xargs rm -f

would clean up the spurious files.

To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to