On Sun, Aug 16, 2009 at 10:18 AM, Jeenu<[email protected]> wrote: > On Aug 13, 9:09 am, Sitaram Chamarty <[email protected]> wrote: >> On Thu, Aug 13, 2009 at 7:06 AM, Jeenu<[email protected]> wrote: >> > Git doesn't warn, by the way; instead, it just removes the file if I >> > checkout a branch where the file is not tracked (master), from one >> > where it's tracked (foo). >> >> > One option that I see is to merge foo to master, so that files that >> > are tracked on foo, but are untracked on master, become tracked on the >> > latter. >> >> At which point git will complain that "untracked file foo will be >> overwritten by merge" :-) >> >> Sorry, you can't win this one. > > SVN too behaves the same. But GIT being a snapshot saver/restorer (at > least that's he picture I've got so far), I was a bit surprised. > > So I guess it's a "globally accepted behavior", and I just live with > it :)
Actually, it's got nothing to do with "accepted". No other meaningful behaviour is even possible. Let's say you're on branch B, and then checkout branch A. Git has no way to distinguish between this file that you say should not get deleted, and some other file that really should only exist in B and therefore _should_ get deleted when moving to A. --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "GitHub" 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/github?hl=en -~----------~----~----~----~------~----~------~--~---
