top | item 39596522

(no title)

opium_tea | 2 years ago

How is it different from the second bullet point? Except the second bullet point is more specific in that it says what to do with uncommitted changes.

discuss

order

coldtea|2 years ago

>How is it different from the second bullet point?

How "cloning the repo on a different folder on the same machine just to work on a bug fix" is different from the main way Git is supposed to be used (creating a new branch for the bug fix and working there, then checking out your feature branch again)?

In that it doesn't make sense.

They might as well go full 1980s style "codebase_1/ codebase_2/ codebase_3/ codebase_3.bak/" and so on copies, and skip code management altogether...

opium_tea|2 years ago

That's the third bullet point. I was talking about this one:

> You can stash everything, create a new branch, switch to it, fix the bug, commit and push it, then switch back to what you were working on.

OP said this (you and a few others reiterated or agreed with it)

> Why couldn't you, like, create another branch off of main, switch to that, and fix the bug there, then resume working on your feature branch?

I can't see the difference. Seeing them side by side they're virtually identical except the blog author specified stashing!