News for hackers. Stuff that matters.
Re:Oh shit, git (2016) by mleonard on Tuesday May 14, 2019 @06:02AM (#19908148)
Hi. Interesting to know thanks!

Would you mind giving the current commands to achieve the three things you just listed?

That way I learn the future restore command along with the current approach and you description. T

Re:Oh shit, git (2016) by bicolao on Tuesday May 14, 2019 @06:20AM (#19908225)
"git restore --staged" should be the same as "git reset -- file" (--mixed, --soft and --hard cannot be used with individual files).

"git restore --worktree" is the same as "git checkout -- file".

"git restore --source..." should be the same as "git reset --hard -- file" if --hard was made to work with individual files.

Though "git restore" should make it clear (or clearer) to the user what they want to restore without resorting to more mysterious options like --hard/--soft. So if that's not obvious from my examples, I think I've failed :)

Re:Oh shit, git (2016) by mleonard on Tuesday May 14, 2019 @08:51AM (#19908957)
Thanks really very helpful!

When you hoping to have git restore in the official git release?

Re:Oh shit, git (2016) by bicolao on Wednesday May 15, 2019 @06:40AM (#19918070)
> When you hoping to have git restore in the official git release?

If things go well, maybe v2.23.0, unless we find serious UX flaws and scrape the whole thing.