simonthum / git-sync

Safe and simple one-script git synchronization
773 stars 99 forks source link

Automatically download repo's #6

Closed Exuviax closed 9 years ago

Exuviax commented 9 years ago

I have multiple people who are working together on a project via GIT-HUB and was wondering if I could use, or would be able to alter this script to allow for automatic detection that the git-repo has been updated and to sync my files with it. AKA: Download the changed files from the repo into my file-system?

simonthum commented 9 years ago

Well, probalbly, but since it will be hard to detect if updating the tree is safe it probably is, put mildly, unsustainable.

git fetch alone is very safe, but anything that writes to the tree should be in accordance with the user and his tools. Thus, unless you have a very convincing use case, I would not recommend doing so.

That said, you could add a mode to git-sync that detects if you you're diverged or behind, and just informs you but doesn't pull. I would take a patch for that.

simonthum commented 9 years ago

Closing due to inacvtivity.