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 Tendencias
- 1. #911onABC 4,147 posts
- 2. Athena 9,085 posts
- 3. Happy Halloween 415K posts
- 4. #RavensFlock 3,083 posts
- 5. Prince Andrew 46.3K posts
- 6. Georgetown 2,193 posts
- 7. Ryan Clark 4,251 posts
- 8. #TNFonPrime 1,381 posts
- 9. Henry 48.7K posts
- 10. Lamar Jackson 7,258 posts
- 11. Heritage 55.5K posts
- 12. Sydney Sweeney 115K posts
- 13. Jaire N/A
- 14. Thursday Night Football 4,529 posts
- 15. Morgan Geekie N/A
- 16. Mike Reilly N/A
- 17. Usha 38.5K posts
- 18. UTSA 1,744 posts
- 19. Go to TikTok 5,105 posts
- 20. #Dolphins 1,206 posts
Something went wrong.
Something went wrong.
 
            