New in Git: switch and restore
banterly.net
New in Git: switch and restore
1–10 of 550 posts
Re: New in Git: switch and restore
#2As a long time git user I absolutely love `git restore`. I hope that the ongoing improvements in porcelain will continue.
Re: New in Git: switch and restore
#3It'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.
Re: New in Git: switch and restore
#4You don't need -- as much in the "git restore" example. With git checkout it may be necessary to separate the branch and the paths with "--" but since "git restore" does not take a branch (except with -s), doing this is totally fine
git restore test.txtRe: New in Git: switch and restore
#5It'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.
What would top recommendations be for tutorials using the newest UI?
Re: New in Git: switch and restore
#6Been there for about 2 years I believe.
Re: New in Git: switch and restore
#7It'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.
It’d be interesting to add a config that disables the cruft for interactive terminals. I wonder if that could be a pathway towards deprecation.
Re: New in Git: switch and restore
#8I wish git had some tree transversal related commands instead of all the crypto commands that nobody understand what they are doing without long tutorials. Got a feeling that this is a case where going down to the metal is better than all the abstractions.
Re: New in Git: switch and restore
#9git restore, where have you been all my life?
Re: New in Git: switch and restore
#10Good article. I've been using git switch since I started using git CLI a few months ago, but restore is new to me!