4 ms·
It's not really new anymore, but still way underused, so it could certainly do with more attention. Git's UI has become better, but they can't really remove the
by Vinnl 5y ago
It's not really new anymore, but still way underused, so it could certainly do with more attention. Git's UI has become better, but they can't really remove the old UI and tutorials using those, so people keep sticking to that.
- easygenes 5y agoWhat would top recommendations be for tutorials using the newest UI?
- Vinnl 5y agoWe're commenting on one :) But really there's not much to it - `git checkout` is the main wart of Git's UI given how overloaded it is, and with `git switch` and `git restore`, you'll have banned out pretty much all of its regular use. And given how much more straightforward (i.e. they have more guessable arguments) those are, there's not as much need for tutorials anymore.
- pcl 5y agoIt’d be interesting to add a config that disables the cruft for interactive terminals. I wonder if that could be a pathway towards deprecation.
- agumonkey 5y agoand it's a very general problem distributing improvements after a large mass of old habits are spread around is something to be fixed
- Omin 5y agoI can't reasonably start using such functionality until the PC with the oldest software that I still use has updated or I will have to deal with 2 ways of doing things all the time. Currently, that's an ubuntu 18.04 machine at work and that doesn't have `git restore`, yet.
- coder543 5y agoYou could install newer versions of git using a ppa: https://launchpad.net/~git-core/+archive/ubuntu/ppa https://launchpad.net/~git-core/+archive/ubuntu/ppa
- makeitdouble 5y agoThese new commands make a lot more sense, but the weird thing is they don’t bring anything else to the table. They behave exactly like the existing ones, so much that anyone that really cared could have just aliased them. So is there any incentive to switch for the people who went through the trauma of burning the old ones in their soul ? (I often heard that knowing how it works internally makes git commands feel natural. I was lied to)
- Vinnl 5y agoThey don't behave exactly like the old ones, because they do less - which means it's harder to accidentally do the wrong thing, and it's easier to guess what its arguments do. If you know the old ones already and don't make mistakes, it's fine not to use these, really. I consciously got the new commands into my muscle memory in case I'm pair programming or someone less familiar with Git is looking along. And yeah, knowing how Git works makes it a lot easier to understand, but it doesn't make the commands more natural. (Except perhaps knowing when you can use a commit id instead of a branch name.)
- onionisafruit 5y agoI had git-checkout syntax burned into my soul. I switched to switch/restore a year or so ago and am happy to be mostly unburdened of git-checkout. I say mostly because I still use it in scripts so they work with old git versions.