Sorry if this is duplicate. Tried my best to search first.
My project has dependency to a GitHub repo. This repo is maintained by other people, and I have no write permission. This repo is currently API stable, so backward incompatibility is not big concern. And the repo is fairly large. git clone --depth=1
takes about 5-10 minutes. I need a simple way to
- make sure my project is always using the latest revision (for example, git pull on my project always pulls the updates of the repo); and
- pull the updates of the repo incrementally, because it is big.
Here are what I tried and why I discard it.
- submodule. Submodule is well known for its static nature. Since the repo is stable, I do not need the static nature. I do not want to pollute the log with dummy messages.
- subtree. I do not want to pull this big code base to my repo. Also, I have no need to contribute back.
- clone. As mentioned, clone takes too long. Better be incremental.
- remote and archive. I think GitHub does not support archiving. Both the SSH and https URL fail.
- post-receive hook. Is this a viable approach? I need more knowledge to evaluate this.
It is hard to believe I'm the only one to have this issue with git. Please correct me if I misunderstand any of the approaches.
Thanks for help.