Re:Git undo: We can do better
by munificent on Monday June 21, 2021 @12:45PM
(#27580922)
> "git branch create" is "git branch [name]".
I've been using Git professionally for of a decade and you just taught me something new. I always use `git checkout -b [name]` (which is a completely bananas UX, but it's the one I know).
Re:Git undo: We can do better
by seoaeu on Monday June 21, 2021 @01:19PM
(#27581278)
The two commands aren't actually equivalent, because of course they're not. Usually when you create a new branch you'd like to switch to it, but git branch [name] actually doesn't do that, so you have to execute a second command after.
I've been using Git professionally for of a decade and you just taught me something new. I always use `git checkout -b [name]` (which is a completely bananas UX, but it's the one I know).