4 ms·
I was learning git around the time `switch` and `restore` were introduced to tackle the problem of checkout being overloaded. I started using the new commands a
by anonymous_sorry 4y ago
I was learning git around the time `switch` and `restore` were introduced to tackle the problem of checkout being overloaded. I started using the new commands and it instantly made more sense and began to click. I very rarely use checkout at all.
Something to be aware of when training junior devs. Do them a favour and learn switch/restore first!
- b0afc375b5 4y agoI think this is the first time I've heard of switch and restore. Before I moved to magit I always used git checkout and git reset.
- jawilson2 4y agoI've been using git since 2009, first for me too
- jacobyoder 4y agoGit switch and git restore were introduced in Git v2.23, way back in August 2019. So... they're not brand new in the last few months, but... like you (and another poster) I'm not aware of them, as I had ... 8-10 years of muscle memory before without them around. I'm actually trying to think back to when I first used git... I don't think I learned about it at all until around 2007 - company I was at had a lot of SVN and a couple of the folks on the team were exploring other options. And... IIRC, around mid-to-late 2008, someone at a local Ruby group demonstrated github. But... I'm not sure I actually started using git 'for real' until 2010 or so. So... there was 9+ years of learning certain commands/styles and... switch/restore weren't part of that. And I've mostly switched to GUIs for day to day stuff - the Tower Mac client and sometimes the JetBrains git tools. They might even now be using 'switch' and 'restore' for some basic operations behind the scenes.