Git is defaulting to a bad branch, and trying to change it to a good branch crashes.
Git does not try to access
origin/origin/main, and switching to
origin/main does not crash.
Git is defaulting to the branch
origin/origin/main, attempting to change the branch to
origin/main causes a repl crash.
Steps to reproduce:
- Have a repl that defaults to a branch that has
origin in its name twice
- See issue 1
- Try to change branch to the “normal” branch
- See issue 2
Bug appears at this link:
Replit app/Android 13/Samsung phone
Thank you for reporting this. I will send this to the right people so we can get this fixed!
Hey! Would you mind recording a loom.com video of how to reproduce this from scratch? We looked at your Repl and tried to reproduce this on our own Repl but weren’t successful.
I’ll at least record the bug in mine, but I’m not sure how it was triggered. Hang on.
Have a recording of the bug, I will upload it to my image hosting repl in a little bit. As for steps to reproduce, I’m not sure, but it was a fork of another repl that had an existing GitHub repl linked to it, so maybe that has something to do with it.
Sorry for the delay, here’s the video:
(I put it on a Bullet Point so that discourse won’t load the video and kill my egress hopefully)
Thanks, we will look into this!
(Also, I have downloaded the video as to not fill up your egress each time I need to reference it)
We are still looking into this issue. Out of curiosity, does forking the Repl fix the issue @Firepup650?
Forking the repl with the issue persists the issue, I thought it would cause it to add a another layer of
origin to the GIT repo, but it did not. It just stayed at the same bugged out level.
Adding on to this topic, backing up files, manually overriding branch, restoring backup, making any necessary edits (Removing/Adding files), and pushing to Git by hand does resolve the issue, though the buggy branch still exists. I have intentionally not done this on my main Repl until we have any idea into why this occured.
Commands you can use to repair Git
zip && unzip
zip bkp.zip .*
mv bkp.zip ..
git branch -f main
mv ../bkp.zip .
echo do your git fixes here, add/remove files as neccessary
git commit -a -m "Git Patch"
git push -fu origin main
- Press y when replit asks if you want to add “zip” and “unzip”
- zip and unzip will be slow, this is to be expected, we’re backing up all of
- Press A → Enter when zip asks about overwriting files.
- Yes, A must be uppercase in step 3.