Git cannot do that remotely (with exception of git-tar-tree/git-archive
which has --remote option), yet. But you can get contents of a file
(with "git cat-file -p [<revision>:|:<stage>:]<filename>"), list
directory (with "git ls-tree <tree-ish>") and compare files or
directories (git diff family of commands) without need for working
directory.
AFAICT working area is required _only_ to resolve conflicts during
merge.
In git by default in the top directory of working area you have .git
directory which contains whole repository (object database, refs (i.e.
branches and tags), information which branch is current, index aka.
gitcache, configuration, etc.). You can share object database locally
(which includes network filesystem).
You can have .git (usually <project>.git then) directory without working
area.
And you can symlink (and in the future "symref"-link) .git directory.
There was proposal to allow for tracking branches to be marked
read-only, but it was not implemented yet.
But git has reverse check: it forbids (unless forced by user) to fetch
into branch which has local changes (does not fast-forward). This make
sure that no information is lost.
The idea is that you fetch changes into tracking branch (e.g. 'master'
branch of some parent remote repository into 'origin' or
'remotes/<repository name>/master' branch); you don't commit changes to
such branch. You do your own work either on 'master' branch, then merge
(typically using "git pull") corresponding 'origin' tracking branch, or
use separate private feature branch and use rebase after fetch.
[...]
Git is designed for distributed workflows, not for centralized one.
All repositories are created equal :-)
--
Jakub Narebski
ShadeHawk on #git and #revctl
Poland
-
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html