Initially, the ‘master’ branch contained two directories. (Let’s say ‘dir1’ and ‘dir2’)
A development branch ‘dev’ was created from ‘master’ afterwards. For project purposes, both dir1 and dir2 should be continued updated in ‘dev’ branch, but ‘master’ should not contain dir2.
How it is possible to implement a merge into ‘master’ from ‘dev’ without taking dir2 each time?
Contrary to SVN, git doesn’t track individual directories at all.
You could, however, include
dir2in.gitignorein the existing repository and set up a different git repository for its content.