Binderhub: Binder correctly pulls the data for a branch, but git thinks it is in the master branch

Created on 9 Jul 2020  路  5Comments  路  Source: jupyterhub/binderhub

Bug description

When binder launches from a github branch, it gets the correct data for that branch. If you launch a Terminal window, git does not reflect that.

git branch
* master

Expected behaviour

In my example, I used the development branch. I expected git branch to report "development".

Actual behaviour

See bug description, above.

How to reproduce

This is the contents of README.md in my development branch:

bindertest

Test of using branch in binder

Binder development branch

  1. Click on the launch binder badge.
  2. After jupyterlab shows up, launch Terminal panel
  3. In Terminal, git branch
  4. Reports "* master", expect "* development"

Your personal set up

Not relevant

  • OS:
    Using Mac, but I don't think that matters
  • Version:
    bash jupyterhub --version 1.1.0
  • Configuration: N/A
bug

All 5 comments

Thank you for opening your first issue in this project! Engagement like this is essential for open source projects! :hugs:

If you haven't done so already, check out Jupyter's Code of Conduct. Also, please try to follow the issue template as it helps other other community members to contribute more effectively.
welcome
You can meet the other Jovyans by joining our Discourse forum. There is also an intro thread there where you can stop by and say Hi! :wave:

Welcome to the Jupyter community! :tada:

Could this be because both development and master are the same commit 815012fb283e933b1a56bc8b777abbd3df5ee234? What happens if you add a commit to your development branch and then start a new binder?

edit: they aren't the same commit.

Need to think about why/how git branch shows "the wrong" branch name.

Does anyone remember why we do such "weird" things on checkout instead of a more standard workflow?

It's to do with submodules

According to https://github.com/jupyterhub/nbgitpuller/issues/142 it's possible to set the upstream git branch after cloning which might resolve this issue.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

bitnik picture bitnik  路  3Comments

minrk picture minrk  路  5Comments

betatim picture betatim  路  3Comments

yuvipanda picture yuvipanda  路  5Comments

davidanthoff picture davidanthoff  路  4Comments