The `dvc/scm/__init__.py:scm_context` works with `Repo` objects and
is used mostly in `dvc/repo/...`, so it is better to put it in
`dvc/repo/scm_context.py`.
Fix#1769
Tree objects are used as `Repo().tree`, so it seemed logical to put them
inside `dvc/repo/tree.py`. But what is more important - `dvc.repo.Repo`
depends on `dvc.scm` and it is not convinient to use `dvc.repo.tree` in
`dvc.scm.git`.
Fix#1769
Uncommited files wouldn't be accessible as git objects.
It needs `git clean -fd` to amend "Working Tree" metrics collection
which took its part when the git tree is dirty.
Abstract access to filesystem and its implementation to access files and
particulary Stage objects in different git branches without `git
checkout` execution.
It is better to make a file copy before moving it, since move is
a nearly-atomic operation and copy is a long one.
Also the biggest problem here is that if some application would access
the file during the process of `copyfile` then it would get the part of
file.