Hi, On Thu, Jul 30, 2009 at 07:12:24AM -0500, Vlad Didenko wrote: > > Is there an easy way to exclude a directory from a merge operation. You cannot merge some directories but not other, but you always can discard any changes during merge. > Specifically: > > We have a "master" branch. We also have an "other" branch. There is a > directory XYZ in the other branch which is not in the master. I need to > merge everything but XYZ into master. Something like that: > > git checkout master > git merge other --exclude XYZ I have not tried, but it should be like this: git merge --no-commit other git checkout HEAD XYZ # or 'git rm XYZ' if XYZ does not exist on master git commit NOTE: Git will consider all changes including the directory XYZ as already merged into master and will not try to merge it later (unless there are some other changes to that directory). Dmitry -- 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