Okay, one more... Ever commit something only to immediately realize that you're on the wrong branch? Use "git move <branch>".

coderabbi's tweet image. Okay, one more...
 
Ever commit something only to immediately realize that you&apos;re on the wrong branch?
 
Use &quot;git move &amp;lt;branch&amp;gt;&quot;.

I personally just "git checkout -b NEWBRANCH" then go back to the previous branch and reset to the last good commit


So... three checkouts by the time you get back to the new branch to continue working?


Again, only one is necessary if you use proper commands like branch and reset.


"proper" 🤔 But, yes, branch instead of checkout -b, avoids the three checkout dance. branch/reset/checkout indeed works... like this:

coderabbi's tweet image. "proper" 🤔
 
But, yes, branch instead of checkout -b, avoids the three checkout dance.
 
branch/reset/checkout indeed works... like this:

United States Tendances
Loading...

Something went wrong.


Something went wrong.