Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -26,8 +26,8 @@ jupyter nbextension enable --py githubcommit
## Steps

* Install package using above commands
* Create Git repo where notebooks will be pushed if not already exists and clone it in home directory
* Clone this repo as well in home directory
* Create Git repo where notebooks will be pushed if not already exists and clone it in your `GIT_PARENT_DIR`
* Clone this repo as well in your `GIT_PARENT_DIR` directory
* Replace the values in env.sh present in this repo itself
* Run the command - source ~/githubcommit/env.sh
* Configure ssh key (present in ~/.ssh/id_rsa.pub or specified location) in github account
Expand Down
4 changes: 2 additions & 2 deletions env.sh
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ export GIT_REMOTE_UPSTREAM=$GIT_USER_UPSTREAM/$GIT_REPO_NAME


####################### Git Repo where notebooks will be pushed ############
cd ~ && git clone $GIT_REMOTE_URL_HTTPS
cd $GIT_PARENT_DIR && git clone $GIT_REMOTE_URL_HTTPS



Expand All @@ -34,4 +34,4 @@ fi

echo 'c.NotebookApp.disable_check_xsrf = True' >> ~/.jupyter/jupyter_notebook_config.py

cp ~/githubcommit/config ~/.ssh/config
cp $GIT_PARENT_DIR/githubcommit/config ~/.ssh/config
2 changes: 1 addition & 1 deletion githubcommit/handlers.py
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ def put(self):
# commit current notebook
# client will sent pathname containing git directory; append to git directory's parent
try:
print(repo.git.add(str(os.path.expanduser('~') + "/" + os.environ.get('GIT_REPO_NAME') + filename)))
print(repo.git.add(str(os.environ.get('GIT_PARENT_DIR') + "/" + os.environ.get('GIT_REPO_NAME') + filename)))
print(repo.git.commit( a=True, m="{}\n\nUpdated {}".format(msg, filename) ))
except GitCommandError as e:
print(e)
Expand Down