jupyterhub / jupyterhub/nbgitpuller

set upstream when a branch is provided?

Open
#142 1 comment 0 reactions 0 assignees View on GitHub
enhancement
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

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.