I have a client that I do work for via a git repository. I do not want for him to know that I am partly using another developer. I have therefore created a "shadow" repository, that my developer is using.
How to sync the "shadow" repository with the main repository so that the main repository does not know that this is happening?
you can have the same set of local files revisioned by different git repositories, using the command line. Just use the GIT_DIR environment variable. The Git repositories are completely independent, and can track files from the same directory.
rem set Git to use the sub-developer's git repository set GIT_DIR=http://path/to/sub/repository.com rem verify which repository that you are on git rev-parse --git-dir rem pull the sub-developer's latest git pull rem merge, commit, change, push, change branches, whatever rem ... when the code is the way you want it rem switch to client repository set GIT_DIR=http://path/to/client/repository.com rem push the updated code to the client repository git push
this is useful for other development practices, like versioning lab data, local developmental utilities, work logs, and other 'misc' files that seem to accumulate with the source code, but shouldn't be archived with it.