git: Make the work tree reflect only a subpath of the whole tree -
i checkout whole branch, work inside specific directory of branch. therefore sort of "dive in" whole tree , make work tree reflect subdirectory chose. e.g.:
"master" tree dir1/ file1 file2 dir2/ file3 work-dir tree .git file1 file2 my guess this:
git checkout master:dir1/ however, doesn't work , reports error:
fatal: cannot switch branch non-commit 'master:dir1/' is possible?
note: don't want use submodules because don't want slice repo unrelated pieces. subtree merge, far can tell, helps me synchronize 2 separate directories similar structures different histories. want modify original objects in repo , able merge them , forth , retain history.
it's not possible. can use cd dir1 , git still work there, allowing use git add file1 instead of git add dir1/file1 etc.
Comments
Post a Comment