0

Imagine a folder like this

Dropbox
-Main folder
--GIT PUSH THE MAGIC REPO.exe
--THE MAGIC REPO
---editor.html
---index.html

Can I make a self-contained file that would push the repo even if the machine has no git installed on it nor any system permissions to do so?

Context: I am using GitHub pages and added a visual editor for the website (editor.html) after the non-technical person is done editing the file in local I just want a "PUBLISH" executable for them to hit that executes a git push.

PovilasID
  • 883
  • 10
  • 34

1 Answers1

0

Arguably, if your DropBox folder also included a Git installation, then you could have a post-commit hook which would execute the push.

But having a Git repo within a DropBox folder is risky.

I would rather delegate the push/publicatio task to a separate machine, which would have the same DropBox folder (and Git installed) and would:

  • keep the actual Git repo separate from the DropBox folder (the latter including the files, and only the files)
  • monitor any changes in that folder: git --git-dir=/path/to/.git --work-tree=/path/to/DropBox/Folder status
  • on changes, do an add, commit and push.
VonC
  • 1,262,500
  • 529
  • 4,410
  • 5,250