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 Trends
- 1. Happy Halloween 372K posts
- 2. YouTube TV 61.6K posts
- 3. ESPN 53.9K posts
- 4. Disney 75.4K posts
- 5. Hulu 19.6K posts
- 6. #FanCashDropPromotion N/A
- 7. #FridayVibes 3,529 posts
- 8. Reformation Day 1,932 posts
- 9. Good Friday 40.3K posts
- 10. #RUNSEOKJIN_epTOUR_ENCORE 253K posts
- 11. YTTV N/A
- 12. Trick or Treat 327K posts
- 13. Mary Ann 1,394 posts
- 14. #T1WIN 16.8K posts
- 15. Fubo 1,599 posts
- 16. #SpookySeason 5,508 posts
- 17. THE TRUTH UNTOLD 37.2K posts
- 18. Faker 28.3K posts
- 19. WorldAssets 1,715 posts
- 20. Satoshi Nakamoto 6,591 posts
Something went wrong.
Something went wrong.
 
            