Okay, one more... Ever commit something only to immediately realize that you're on the wrong branch? Use "git move <branch>".
 
                                            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:
 
                                            Why the "soft" checkout? My assumption would be the "incorrect" commit is not supposed to be on current branch and as such can be removed.
It's going to be removed when you checkout the other branch (it's gone if you return), but otherwise it unstages everything.
Hmmm. Should be able to include optional second argument to specify number of commits to "move", too. Bonus.
United States 趋势
- 1. Happy Halloween 889K posts
- 2. YouTube TV 52.8K posts
- 3. Dolphins 42.5K posts
- 4. #RUNSEOKJIN_epTOUR_ENCORE 120K posts
- 5. #SinisterMinds 7,572 posts
- 6. #Jin_TOUR_ENCORE 115K posts
- 7. Mary Ann N/A
- 8. Ryan Rollins 12.9K posts
- 9. Lamar 54K posts
- 10. #T1WIN 8,609 posts
- 11. Hulu 19K posts
- 12. YTTV N/A
- 13. Mindy 3,836 posts
- 14. Talbot 1,125 posts
- 15. Mike McDaniel 5,331 posts
- 16. Mork 1,857 posts
- 17. #TrickOrTreat 5,876 posts
- 18. frank iero 2,155 posts
- 19. Corey Perry N/A
- 20. toby fox 8,292 posts
Something went wrong.
Something went wrong.
 
            