From: Duy Nguyen Date: Wed, 15 May 2019 11:16:48 GMT Subject: Re: Feedback on git-restore Message-ID: <20190515111647.GA31209@ash> In-Reply-To: <87d0kkvv96.fsf@evledraar.gmail.com> On Wed, May 15, 2019 at 12:59:17PM +0200, Ævar Arnfjörð Bjarmason wrote: > One thing that would be really useful (and maybe it even exists, I just > haven't seen it in the mails) is some abbreviated cheatsheet style doc > of before/after in the UI. Similar to cheatsheets like e.g.: > > https://git.wiki.kernel.org/images-git/7/78/Git-svn-cheatsheet.pdf > http://unix4admins.blogspot.com/2013/03/unix-commands-comparison-sheet.html > > As far as I can tell the best examples are your changes to > s/checkout/[reset|switch]/ in various existing docs, that's great, but > isn't so easy to understand at a glance. OK the cheatsheet would be like this (I'm dropping "git" prefix to keep it short) checkout -> switch (same "dwim" behavior) checkout -> switch --detach checkout -b -> switch -c checkout -> restore [--worktree] checkout -- -> restore --source= --worktree --staged reset -> restore --staged reset -- -> restore --source= --staged reset --hard -> restore --source=HEAD --staged --worktree :/ (not available now) -> restore --source= [--worktree] There are other behavior changes to improve things, e.g. --no-overlay is the default in "git restore". But those can't be shown in a cheatsheet. -- Duy