News for hackers. Stuff that matters.
Re:Git undo: We can do better by cerved on Monday June 21, 2021 @02:31PM (#27582199)
Git checkout branch means change the entire working tree to the reflect the state of the branch and git checkout file, checkout the state of that file in HEAD. Both commands to the same thing, change the state of your working tree to reflect a point checked into version control.

It sounds like you are unaware of

  git switch branch
and

  git switch -c new-branch
Re:Git undo: We can do better by Vinnl on Monday June 21, 2021 @03:08PM (#27582862)
Just a tip: when teaching people, the readable alias is easier to remember and understand, i.e.

    git switch --create new-branch
Re:Git undo: We can do better by wstone on Tuesday June 22, 2021 @05:52AM (#27589723)
Thank you. It seems silly but my first parse was "-c(heckout)" but that comes from not using "switch" yet; I need to rewire my brain from "checkout".
Re:Git undo: We can do better by riquito on Monday June 21, 2021 @03:31PM (#27583233)
It was a good example: it was obvious by the name of the branch and he/she was teaching the real word use case