Closed VladPetriv closed 10 months ago
Ah yeah so in normal git you aren't allowed to force update the branch you are on.
I felt like it wasnt worthwhile to include this restriction in the lessons, because its just extra work to go to another branch and then go back. It definitely diverges from git normally, but we do that in a few places in the lesson
I felt like it wasnt worthwhile to include this restriction in the lessons, because its just extra work to go to another branch and then go back. It definitely diverges from git normally, but we do that in a few places in the lesson
I agree that we should not add this limitation to the practical lessons.
Instead, I suggest adding the mention of this limitation to the first page of the theoretical lesson in a format like this:
Note: In a real git environment git branch -f command is not allowed for your current branch.
Thank you)
The
git branch -f { branch_name } HEAD^
is only allowed if you are not at{ branch_name }
. If you are at the{ branch_name }
you'll receive an errorfatal: cannot force update the branch 'main' checked out at
. It's not so obvious, so could you please add this clarification onBranch forcing
page?)