Edit: Note that the OP added key information to the question; the first part of this answer assumes something that is not the case.
Every commit has a full and complete snapshot of every file (well, every file that is in that commit).
What this means is that you have a series of snapshots:
...--F--G--H <-- somebranch, origin/somebranch
where H
holds the latest snapshot, containing some set of files. Since you deleted a file, H
has one fewer files than snapshot G
.
If you make a new snapshot that has the file again, you get:
...--F--G--H <-- origin/somebranch
\
I <-- somebranch
where the snapshot in I
matches that in H
except that the file that is missing in H
is present in I
. When you git push
this commit to the other Git, the other Git should accept it and add it to their somebranch
, so that you now have:
...--F--G--H--I <-- somebranch, origin/somebranch
Commit H
continues to exist, and continues to lack the file. As long as that's fine, that's fine.
You cannot change commit H
, at all, ever, so if that's not fine, you'll have to convince that other Git to discard its copy of commit H
. In general, the way you do that is to discard yours as well, by making a new and improved commit H
that replaces H
:
H <-- origin/somebranch
/
...--F--G--H' <-- somebranch
where H'
does have the file. Then you use a force-push variant of git push
to tell the other Git that you know that this request will make them throw away their commit H
and replace it with the new and improved H'
, and yes, you want them to do that.
If someone else has made their own commit that depends on existing commit H
, this is not very nice to the someone-else. Make sure no one else depends on any commit(s) you will remove in this way. If you're the only one using the other Git repository, that means you just need to agree with yourself. If other people use the other Git repository too, get their agreement first.
(If it's OK to leave H
in place, that's almost always easier and better.)
Re your edit: That piece of information is hugely important. This means there are already some other commits I
, J
, etc., that come after the H
that is missing the file. Commits I
, J
, etc., presumably are also missing the file. If you build a new-and-improved replacement commit H'
, you must also build a new-and-improved replacement I'
, J'
, etc.