Hi Jonathan, On 17 August 2011 21:45, Jonathan Nieder <jrnieder@xxxxxxxxx> wrote: > Hi Hilco, > > Hilco Wijbenga wrote: > >> It would be really nice, though, if Git could somehow >> "stash" such files when checking out a different branch. In general, I >> would prefer if uncommitted changes and untracked and/or ignored files >> stuck to the branch where they were created. > > This is just a random guess, but: wouldn't it be convenient in this > workflow to have a separate worktree for each branch you are working > on? That way, switching branches would not carry over unwanted state > or throw away valuable state, clobber timestamps that "make" pays > attention to, etc. > > If I am understanding correctly, then the git-new-workdir script > from contrib/workdir might help. (Note, though, that it comes with > some caveats. A quick mailing list search should find them.) Yes, both a separate clone and git-new-workdir (which I've just started using) would work. I'm not entirely happy with this solution, though. It means having to create an Eclipse workspace per branch, this is a *lot* of work. (This is mostly Eclipse's fault but still.) One of the exceedingly attractive features of Git is the easy branching and merging. Branching is now no longer easy. :-( I assume it would be possible for Git to move untracked/ignored files out of the way when checking out a different branch? (And moving them back in when going back to that branch.) Are there any objections to doing this? I.e. would it be a bad idea for some reason? So, in essence, would it be possible (and desirable) to associate untracked/ignored files with a particular branch? And only show them when that branch is checked out? -- To unsubscribe from this list: send the line "unsubscribe git" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html