Write directly to a remote Git repository, without adding objects to a local index/repo?

git

Solution

As far as I know, no (not directly, see my completed answer at the end):

Here is the official Git data workflow, between a local and a remote repo:

(source: osteele.com)

As you can see, `git add` is related with the index, and will not yet influence your local repo. The all set of commands are here to help enforce some publication policies:

(source: osteele.com)

The only way to directly influence a remote repo with local changes (as changes in your working directory are entirely unknown to Git) would be to:

git diff -p origin > diff_not_in_origin.patch

send the patch and see that the "origin" server has some kind of trigger in place which will `git am` said patch automatically.

Problem

Does Git support any commands that would allow me to commit directly from a local/working tree into a remote repository? The normal workflow requires a "git add", at least, to populate the object database with copies of the file contents, etc. I understand that this is NOT the normal, expected Git workflow. But I noticed that Git already supports downloading directly from the repository, with no local repo ("git archive"), so it seems reasonable that there might be a similar uploading operation. Alternatively, if there isn't such a command in the core Git itself, does any 3rd-party software support direct remote writes?

Original source

Related problems