pcottle / learnGitBranching

An interactive git visualization and tutorial. Aspiring students of git can use this app to educate and challenge themselves towards mastery of git!
https://pcottle.github.io/learnGitBranching/
MIT License
30.4k stars 5.74k forks source link

[Bug]: Locked Main #1019

Closed mg901 closed 1 year ago

mg901 commented 1 year ago

Hi! If I run the command from your solution git checkout -b feature C2 and git push origin feature I get this result.

image

This is a bug? Or that I am doing wrong?

P.S. Thanks in advance.

bbcbear commented 1 year ago

git branch -f main c1

pcottle commented 1 year ago

That's the expected result based on those commands, but it's not sufficient to solve the level. The very last bit of the tutorial for this level mentions needing to reset your main branch backwards:

Create another branch called feature and push that to the remote. Also reset your main back to be in sync with the remote otherwise you may have issues next time you do a pull and someone else's commit conflicts with yours.