Closed milichev closed 1 year ago
@milichev
main
branch outside of csb environment. Which might have caused a change for the branch inside the VM.In the terminal:
git checkout main
git reset --hard <remote main sha>
Switch the environment to the main, both via the branch chooser and address bar.
Each branch VM is isolated instance, So, resetting master in a new URL and changing the branch to main
from the branch switcher will not rest the main
in your default branch. I will note this, maybe we should highlight this explicitly, the behaviours inside the VM will not reflect changes in any another VM that is running.
I checked your sandbox, and at the moment it seems to not have any conflicts. So, if you are do have any issues with remote branches.
You can try resetting to local with the terminal, for the default
branch itself. And not a different VM, or you can use the
Reset branch with Remote
option on the top menu.
If you still have any issues around the default branch. Please let know, i can help in looking at the behaviour 👍
And we are actually working on removing the protected
limitation on the default branches too. So users can pull and push from any branches all the time.
@JayaKrishnaNamburu, thanks for your explanations! Yes, somehow the repo self-cured. I tried to re-login today, and the repo seems clean and working.
Now, I understand a bit about how VMs and branches correlate. F.x. when I git checkout another-branch
, the source code and the project structure in the left pane change. Then the interesting begins:
Keep up the great work!
Nice, good to know the explanation helped. Please feel to reach out anytime 😄. The way the repositories or sandboxes works is, single VM instance per branch. So you can have your isolated, front end, backend running, seed data in databases without hurting any other branches 👍
🐛 bug report
Preflight Checklist
Description of the problem
I somehow got a git conflict between the local and remote
main
branches, which are both 1 commit ahead. Despite the "Protected" red label, the files are editable, but I never commit to themain
branch in csb explicitly.Now, I cannot reset the local branch.
Then I tried to:
Tried deleting the local branch and fetching it again - same.
Tried deleting the repository from codesandbox dashboard to re-import it again - no effect:
Tried to rename
main
tomaster
and re-import the repo:main
which is still broken 😡After all, how could I delete the repo completely?
How has this issue affected you? What are you trying to accomplish?
Restore the repo in codesandbox after the merge conflict.
To Reproduce
Link to sandbox: link
Your Environment