nbgitpuller icon indicating copy to clipboard operation
nbgitpuller copied to clipboard

Issue when file is added and then removed from repo

Open ischmidt20 opened this issue 3 years ago • 2 comments

Bug description

Scenario: We have an assignment released in our public repo. Students pull, work on assignment A. A week later, this assignment gets removed from our repo due to a forced push. Students click link to load in other assignments. Students then see merge issues with their version of the assignment A. Inspection reveals that their copy of assignment A is staged for commit. Students continue to see these issues even after assignment A is restored to the repo.

Expected behaviour

Once Assignment A was restored to the repo, students would no longer see merge issues.

Actual behaviour

Students are unable to sync any other assignments due to a merge conflict with assignment A.

How to reproduce

  1. Push a file to the repo.
  2. Use nbgitpuller to pull a copy of the repo.
  3. Edit the file.
  4. Remove the file from the repo through a force push.
  5. Add another file to the repo.
  6. Try to use nbgitpuller to pull a copy of the repo again.

Your personal set up

I am a course staff member of Data 100 @ UC Berkeley, we are using data100.datahub.berkeley.edu. I do not know the particular configuration.

  • OS:
  • Version(s):
  • Full environment
absl-py==0.13.0
access==1.1.3
aesara-theano-fallback==0.0.4
affine==2.3.0
agate==1.6.1
aiohttp==3.7.4.post0
aiohttp-cors==0.7.0
aioredis==1.3.1
alabaster==0.7.12
alembic==1.6.5
allensdk==2.4.1
altair==4.1.0
anyio==3.2.1
appdirs==1.4.4
appmode==0.8.0
argon2-cffi==20.1.0
argschema==1.17.5
arviz==0.11.2
asn1crypto==1.4.0
ast-scope==0.3.1
astropy==4.2
astroquery==0.4.1
astunparse==1.6.3
async-generator==1.10
async-timeout==3.0.1
attrs==19.3.0
azure-common==1.1.27
azure-core==1.16.0
azure-storage-blob==12.8.1
Babel==2.9.1
backcall==0.2.0
basemap @ https://github.com/matplotlib/basemap/archive/v1.2.2rel.tar.gz
beautifulsoup4==4.9.3
bitarray==1.6.1
bleach==3.3.0
blessings==1.7
blis==0.7.4
bokeh==2.2.3
boto3==1.15.18
botocore==1.18.18
branca==0.4.2
brewer2mpl==1.4.1
brotlipy==0.7.0
cachetools==4.2.2
Cartopy==0.18.0
catalogue==1.0.0
certifi==2019.11.28
certipy==0.1.3
cffi @ file:///home/conda/feedstock_root/build_artifacts/cffi_1613413861439/work
cftime==1.5.0
chardet @ file:///home/conda/feedstock_root/build_artifacts/chardet_1602255302199/work
chart-studio==1.1.0
click==8.0.1
click-plugins==1.1.1
cligj==0.7.2
cloudpickle==1.6.0
codecov==2.1.11
colorama==0.4.3
colorful==0.5.4
colorlover==0.3.0
conda==4.10.3
conda-package-handling @ file:///home/conda/feedstock_root/build_artifacts/conda-package-handling_1618231394280/work
contextily==1.1.0
corner==2.1.0
coverage==5.5
coveralls==3.1.0
cryptography @ file:///home/conda/feedstock_root/build_artifacts/cryptography_1616851476134/work
cryptorandom==0.2
csaps==1.0.3
cufflinks==0.17.3
cvxpy==1.1.13
cycler==0.10.0
cymem==2.0.5
Cython==0.29.21
cytoolz==0.11.0
daft==0.1.0
dask==2020.12.0
datascience==0.17.0
dbt==0.19.1
dbt-bigquery==0.19.1
dbt-core==0.19.1
dbt-postgres==0.19.1
dbt-redshift==0.19.1
dbt-snowflake==0.19.1
debugpy==1.3.0
decorator==4.4.2
defusedxml==0.7.1
Deprecated==1.2.12
deprecation==2.1.0
descartes==1.1.0
dill==0.3.4
display-timedelta==1.1
distributed==2020.12.0
distro==1.5.0
dm-tree==0.1.6
docker==5.0.0
docopt==0.6.2
docutils==0.17.1
dsassign==0.0.8
dustmaps==1.0.6
ecos==2.0.7.post1
emcee==3.0.2
entrypoints==0.3
esda==2.3.6
et-xmlfile==1.1.0
exoplanet==0.4.3
fancyimpute==0.5.5
fastprogress==1.0.0
ffmpeg-python==0.2.0
filelock==3.0.12
Fiona==1.8.20
flatbuffers==1.12
folium==0.11.0
future==0.18.2
gast==0.3.3
geographiclib==1.52
geojson==2.5.0
geopandas==0.9.0
geopy==2.1.0
george==0.3.1
GetDist==1.1.2
ggplot==0.11.5
giddy==2.3.3
git-credential-helpers==0.2
github3.py==2.0.0
Glymur==0.8.19
gmaps==0.9.0
google==3.0.0
google-api-core==1.31.0
google-api-python-client==1.12.8
google-auth==1.32.1
google-auth-httplib2==0.0.4
google-auth-oauthlib==0.4.1
google-cloud-bigquery==2.3.1
google-cloud-core==1.4.4
google-crc32c==1.1.2
google-pasta==0.2.0
google-resumable-media==1.3.1
googleapis-common-protos==1.53.0
gpustat==0.6.0
graphviz==0.16
greenlet==1.1.0
grpcio==1.32.0
gspread==3.6.0
gspread-pandas==2.2.3
h5py==3.1.0
habanero==0.7.4
hdbscan==0.8.26
hdmf==2.5.8
healpy==1.15.0
HeapDict==1.0.1
hiredis==2.0.0
hologram==0.0.13
html5lib==1.1
httplib2==0.19.1
idna==2.8
imageio==2.9.0
imagesize==1.2.0
importlib-metadata==4.6.1
inequality==1.0.0
iniconfig==1.1.1
ipycanvas==0.8.1
ipykernel==6.0.1
ipympl==0.6.2
ipython==7.25.0
ipython-genutils==0.2.0
ipython-sql==0.4.0
ipywidgets==7.6.3
isodate==0.6.0
jassign==0.0.7
jdcal==1.4.1
jedi==0.18.0
jeepney==0.7.0
Jinja2==3.0.1
jmespath==0.10.0
joblib==1.0.0
json-rpc==1.13.0
json5==0.9.6
jsonschema==3.2.0
jupyter-client==6.1.12
jupyter-contrib-core==0.3.3
jupyter-contrib-nbextensions==0.5.1
jupyter-core==4.7.1
jupyter-highlight-selected-word==0.2.0
jupyter-latex-envs==1.4.6
jupyter-nbextensions-configurator==0.4.1
jupyter-resource-usage==0.5.1
jupyter-rsession-proxy==1.2
jupyter-server==1.9.0
jupyter-server-proxy==3.0.2
jupyter-shiny-proxy==1.1
jupyter-telemetry==0.1.0
jupyter-tree-download==1.0.1
jupyterhub @ git+https://github.com/jupyterhub/jupyterhub@11f00dbbe794191d328c6c2a44a9e85f7eb6ede5
jupyterlab==3.0.16
jupyterlab-geojson==3.1.2
jupyterlab-pygments==0.1.2
jupyterlab-server==2.6.1
jupyterlab-widgets==1.0.0
jwcrypto==0.9.1
Keras==2.4.3
Keras-Applications==1.0.8
Keras-Preprocessing==1.1.2
keras-vis==0.4.1
keyring==23.0.1
kiwisolver==1.3.1
knnimpute==0.1.0
lcapy==0.77
leather==0.3.3
libpysal==4.5.1
lime==0.2.0.1
llvmlite==0.36.0
Logbook==1.5.3
lxml==4.6.2
Mako==1.1.4
mapclassify==2.4.2
Markdown==3.3.4
MarkupSafe==2.0.1
marshmallow==3.0.0rc6
mashumaro==2.0
matminer==0.6.5
matplotlib==3.3.3
matplotlib-inline==0.1.2
mercantile==1.2.1
mgwr==2.1.2
mimeparse==0.1.3
minimal-snowplow-tracker==0.0.2
mistune==0.8.4
mne==0.22.0
monty==2021.7.8
mplleaflet==0.0.5
mpmath==1.1.0
msgpack==1.0.2
msrest==0.6.21
multidict==5.1.0
munch==2.5.0
murmurhash==1.0.5
nb2pdf==0.6.2
nbclassic==0.3.1
nbclient==0.5.3
nbconvert==6.1.0
nbformat==5.0.8
nbforms==0.5.1
nbgitpuller==0.10.0
nbpdfexport==0.2.1
nbsphinx==0.8.6
nest-asyncio==1.2.0
netCDF4==1.5.5.1
networkx==2.5
nibabel==3.2.1
nilearn==0.7.0
nlmpy==1.0.0
nltk==3.5
nose==1.3.7
notebook==6.4.0
numba==0.53.1
numexpr==2.7.2
numpy==1.19.5
nvidia-ml-py3==7.352.0
oauthlib==3.1.1
obspy==1.2.2
okpy==1.18.1
opencensus==0.7.13
opencensus-context==0.1.2
opencv-contrib-python==4.5.3.56
opencv-python==4.5.1.48
openpyxl==3.0.6
opt-einsum==3.3.0
orjson==3.6.0
oscrypto==1.2.1
osqp==0.6.2.post0
otter-grader==2.2.0
packaging==21.0
palettable==3.3.0
pamela==1.0.0
pandas==1.2.0
pandocfilters==1.4.3
parsedatetime==2.6
parso==0.8.2
patsy==0.5.1
pdfkit==0.6.1
pep257==0.7.0
permute @ git+https://github.com/statlab/permute@bb2e9303f582121c1e25ffb898804cba1fbeea8b
pexpect==4.8.0
pgspecial==1.11.10
pickleshare==0.7.5
Pillow==8.1.0
Pint==0.16.1
plac==1.1.3
plotly==4.14.3
plotly-express==0.4.1
pluggy==0.13.1
pointpats==2.2.0
popularity-contest==0.4.1
preshed==3.0.5
prettytable==0.7.2
prob140==0.4.1.5
progressbar2==3.53.1
prometheus-client==0.11.0
prompt-toolkit==3.0.19
proto-plus==1.19.0
protobuf==3.17.3
psutil==5.8.0
psycopg2==2.8.6
psycopg2-binary==2.9.1
ptyprocess==0.7.0
py==1.10.0
py-spy==0.3.7
pyaes==1.6.1
pyasn1==0.4.8
pyasn1-modules==0.2.8
pybind11==2.6.2
pycodestyle==2.6.0
pycosat @ file:///home/conda/feedstock_root/build_artifacts/pycosat_1610094800877/work
pycparser @ file:///home/conda/feedstock_root/build_artifacts/pycparser_1593275161868/work
pycryptodomex==3.10.1
pydot==1.4.1
pyee==8.1.0
pyerfa==2.0.0
pygeos==0.10.1
Pygments==2.9.0
PyJWT==1.7.1
pymatgen==2020.10.20
pymc3==3.11.0
pymc3-ext==0.1.0
pymdptoolbox==4.0b3
pymongo==3.11.3
pynndescent==0.5.4
pynrrd==0.4.2
pynwb==1.5.1
pyOpenSSL==19.1.0
pyparsing==2.4.7
PyPDF2==1.26.0
pyppeteer==0.2.5
pyproj==3.1.0
pyreadstat==1.0.8
pyro-api==0.1.2
pyro-ppl==1.5.2
pyrsistent==0.18.0
pysal==2.3.0
pyshp==2.1.3
PySocks @ file:///home/conda/feedstock_root/build_artifacts/pysocks_1610291447907/work
pytest==6.2.4
pytest-cov==2.12.1
python-dateutil==2.8.1
python-editor==1.0.4
python-json-logger==2.0.1
python-slugify==5.0.2
python-utils==2.5.6
pytimeparse==1.1.8
pytutor==1.0.0
pytz==2020.5
PyVCF==0.6.8
pyvo==1.1
PyWavelets==1.1.1
PyYAML==5.4.1
pyzmq==22.1.0
qdldl==0.1.5.post0
qgrid==1.3.1
quantecon==0.5.1
rasterio==1.2.6
rasterstats==0.15.0
ray==1.1.0
redis==3.5.3
regex==2021.7.6
requests==2.25.1
requests-oauthlib==1.3.0
requests-toolbelt==0.9.1
requests-unixsocket==0.2.0
retrolab==0.2.1
retrying==1.3.3
rsa==4.7.2
Rtree==0.9.7
ruamel-yaml-conda @ file:///home/conda/feedstock_root/build_artifacts/ruamel_yaml_1611943339799/work
ruamel.yaml==0.17.10
ruamel.yaml.clib==0.2.6
s3transfer==0.3.7
scikit-build==0.11.1
scikit-image==0.18.1
scikit-learn==0.24.0
scipy==1.6.0
scs==2.1.4
seaborn==0.11.1
SecretStorage==3.3.1
segregation==2.0.0
Send2Trash==1.7.1
setuptools-scm==6.0.1
shap==0.39.0
Shapely==1.7.1
simpervisor==0.4
SimpleITK==1.2.4
simplejson==3.17.3
six @ file:///home/conda/feedstock_root/build_artifacts/six_1590081179328/work
slicer==0.0.7
sniffio==1.2.0
snowballstemmer==2.1.0
snowflake-connector-python==2.3.6
snuggs==1.4.7
sortedcontainers==2.4.0
soupsieve==2.2.1
spacy==2.3.5
spaghetti==1.6.2
spglib==1.16.1
spglm==1.0.8
Sphinx==4.1.0
sphinxcontrib-applehelp==1.0.2
sphinxcontrib-devhelp==1.0.2
sphinxcontrib-htmlhelp==2.0.0
sphinxcontrib-jsmath==1.0.1
sphinxcontrib-qthelp==1.0.3
sphinxcontrib-serializinghtml==1.1.5
spint==1.0.7
splot==1.1.3
spreg==1.2.4
spvcm==0.3.0
SQLAlchemy==1.4.20
sqlparse==0.4.1
srsly==1.0.5
statsd==3.3.0
statsmodels==0.11.1
sympy==1.7.1
tables==3.6.1
tabulate==0.8.9
tblib==1.7.0
tensorboard==2.5.0
tensorboard-data-server==0.6.1
tensorboard-plugin-wit==1.8.0
tensorflow==2.4.0
tensorflow-estimator==2.4.0
tensorflow-hub==0.11.0
tensorflow-probability==0.12.1
termcolor==1.1.0
terminado==0.10.1
testpath==0.5.0
text-unidecode==1.3
Theano==1.0.5
Theano-PyMC==1.1.0
thinc==7.4.5
threadpoolctl==2.2.0
tifffile==2021.7.2
tobler==0.8.2
toml==0.10.2
toolz==0.11.1
torch==1.7.1
torchvision==0.8.2
tornado==6.1
tqdm==4.56.0
traitlets==5.0.5
tweepy==3.10.0
typing-extensions==3.10.0.0
umap-learn==0.5.0
uncertainties==3.1.5
uritemplate==3.0.1
urllib3==1.25.7
wasabi==0.8.2
wcwidth==0.2.5
webencodings==0.5.1
websocket-client==1.1.0
websockets==8.1
Werkzeug==2.0.1
widgetsnbextension==3.5.1
wordcloud==1.8.1
wrapt==1.12.1
xarray==0.16.2
xlrd==2.0.1
yarl==1.6.3
zict==2.0.0
zipp==3.5.0
  • Configuration
# jupyterhub_config.py
  • Logs
# paste relevant logs here, if any

ischmidt20 avatar Jul 26 '21 22:07 ischmidt20

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:

welcome[bot] avatar Jul 26 '21 22:07 welcome[bot]

If you do a force push you've broken the Git history, so in general there's no automatic way to handle this. Do you have the same problem if you remove the file in one commit and and add it back later, without the force push?

manics avatar Jul 27 '21 08:07 manics