jupyterhub / jupyterhub/nbgitpuller
set upstream when a branch is provided?
- Dominant language
- Python
- Stars
- 237
- Forks
- 86
- PR merge metrics
- No merged PRs in 30d
Description
### Proposed change
If a `branch` is provided, also run `--set-upstream origin `, so that `git pull` will work more predictably.
### Alternative options
If maintaining the default behavior is expected, maybe add an additional flag, e.g. `?branch=foo&upstream=foo`.
### Who would use this feature?
We put a binder demo together where there was a heavy-weight env branch and a lightweight content branch of the same repo. We wanted to be able to make changes to the content branch during a live event, then have users use the jupyterlab-git pull button (which just tries to do `git pull`). Instead, they get a nasty-gram (which i'll make as an issue over there, too!)
### (Optional): Suggest a solution
After `checkout` run `git branch --set-upstream-to origin ` (or only if `upstream` is set)
Contributor guide
Assessment
This issue has not been assessed yet.