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;.

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

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

Hmmm. Should be able to include optional second argument to specify number of commits to "move", too. Bonus.


United States الاتجاهات
Loading...

Something went wrong.


Something went wrong.