1

I know in Zeppelin you can utilize Git on your notebooks. I also know how to take that local git repos and push it up to Github. But from what I've seen in the Zeppelin app, users can commit all they want, but those commits stay local until you go in and push the local up to GitHub. My question is, when a user commits inside the Zeppelin app, can a push be done automatically to GitHub as well?

Michael Black
  • 661
  • 11
  • 24

1 Answers1

3

You could setup a post-commit hook as in here in order to push automatically after each commit.

Go to your local repo, in the .git/hooks folder, and create a post-commit file, make it executable, and add:

#!/bin/sh
git push origin master

The next commit (even from the Zeppelin app) will trigger a push.

VonC
  • 1,262,500
  • 529
  • 4,410
  • 5,250
  • I attempted to implement the git hook. The hook fires if I use git from the command line, but within the zeppelin application the hook isn't getting fired?? `git log` confirms that the commit is happening but no explanation why the hook didn't get fired. Puzzling? – Michael Black Apr 30 '19 at 14:26
  • @MichaelBlack You need to make sure the working tree where Apache-Zepelin has checked out the repo does have a .git/hooks/post-commit *executable* file. – VonC Apr 30 '19 at 14:58