nb
nb copied to clipboard
Feature request: read-only notebooks
I’m using nb in a team.
I’d like to add another team’s notebook as my local notebook (so that it’s available for search), but I don’t want nb to ever try to make commits there, even if I happened to have write access to the repo.
Is this something nb could support?
This seems possible. I have to identify a clear way to implement it. It seems like one way to achieve this in the interim is with a pre-commit hook:
cd repo
mkdir -p .git/hooks
cat > .git/hooks/pre-commit <<HEREDOC
#!/bin/sh
echo "Committing to this repo is disabled."
exit 1
HEREDOC
chmod +x .git/hooks/pre-commit