This really appears to be a misunderstanding around how submodules work rather than an issue with symlinks. I highly suggest that you give the Submodules chapter of Pro Git a read.
For the purposes of this explanation let's define a few terms:
A
will be the repository containing the target of your symlink (the link itself).
B
will be the repository containing the source of that symlink.
C
will be the submodule in A
referencing B
.
So you did a git submodule add B
from A
creating C
, then did something along the lines of ln -s B/file file
so that you have a symlink in A
called file
pointing to file
within C
. Everything works.
The problem, as described, appears to be that you then update file
in B
and push that change, however in A
the symlink still shows the original content of file
. The problem is that the C
is just a clone of B
: Just like any other clone of a repository the contents on disk do not change when you change what they were cloned from (eg: if you clone a repo from github and then somebody updates that repo on github the files on your local machine aren't changed). The solution is to update C
and A
: Go into C
, pull the changes you want from B
, then go to A
and commit the change to the submodule.
Some people do find this process quite heavy. If that's the case for you the other answer you linked to does lay out a number of other ways of doing what you wish via scripting (or you could even script the submodule update process if you want).