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 would have thought cherry-pick then reset head would be a *lot* cleaner....


It's pick your poison, really. Here's the same end result using cherry-pick:

coderabbi's tweet image. It&apos;s pick your poison, really. Here&apos;s the same end result using cherry-pick:

It *would* have the advantage of saving the metadata from the original commit, but that's three checkouts, so likely much slower.


This is a great idea. I'm okay with the extra checkouts. I put something similar together at github.com/ironcodestudio…. Thanks.


United States 趋势
Loading...

Something went wrong.


Something went wrong.