From: Duy Nguyen <pclouds@gmail.com>
To: "Ævar Arnfjörð Bjarmason" <avarab@gmail.com>
Cc: Poughon Victor <Victor.Poughon@cnes.fr>,
"git@vger.kernel.org" <git@vger.kernel.org>
Subject: Re: Feedback on git-restore
Date: Wed, 15 May 2019 18:16:48 +0700 [thread overview]
Message-ID: <20190515111647.GA31209@ash> (raw)
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 <branch> -> switch <branch> (same "dwim" behavior)
checkout <revision> -> switch --detach <revision>
checkout -b <branch> <rev> -> switch -c <branch> <rev>
checkout <path> -> restore [--worktree] <path>
checkout <rev> -- <path> -> restore --source=<rev> --worktree --staged <path>
reset <path> -> restore --staged <path>
reset <rev> -- <path> -> restore --source=<rev> --staged <path>
reset --hard -> restore --source=HEAD --staged --worktree :/
(not available now) -> restore --source=<rev> [--worktree] <path>
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
next prev parent reply other threads:[~2019-05-15 11:57 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-05-15 9:38 Feedback on git-restore Poughon Victor
2019-05-15 10:30 ` Duy Nguyen
2019-05-15 10:59 ` Ævar Arnfjörð Bjarmason
2019-05-15 11:16 ` Duy Nguyen [this message]
2019-05-16 2:18 ` Junio C Hamano
2019-05-16 12:12 ` Philip Oakley
2019-05-16 12:44 ` Duy Nguyen
2019-05-18 14:19 ` Philip Oakley
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
List information: http://vger.kernel.org/majordomo-info.html
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20190515111647.GA31209@ash \
--to=pclouds@gmail.com \
--cc=Victor.Poughon@cnes.fr \
--cc=avarab@gmail.com \
--cc=git@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this public inbox
https://80x24.org/mirrors/git.git
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).