public inbox for git@vger.kernel.org 
 help / color / mirror / Atom feed
From: Junio C Hamano <junkio@cox•net>
To: Sean <seanlkml@sympatico•ca>
Cc: git@vger•kernel.org
Subject: Re: [PATCH] Attempt to make git-checkout man page a bit more clear.
Date: Wed, 20 Dec 2006 23:47:42 -0800	[thread overview]
Message-ID: <7vbqlx1yht.fsf@assigned-by-dhcp.cox.net> (raw)
In-Reply-To: <20061221015350.245cc964.seanlkml@sympatico.ca> (seanlkml@sympatico.ca's message of "Thu, 21 Dec 2006 01:53:50 -0500")

Sean <seanlkml@sympatico•ca> writes:

> diff --git a/Documentation/git-checkout.txt b/Documentation/git-checkout.txt
> index fbdbadc..97c3afe 100644
> --- a/Documentation/git-checkout.txt
> +++ b/Documentation/git-checkout.txt
> @@ -8,23 +8,29 @@ git-checkout - Checkout and switch to a branch
>  SYNOPSIS
>  --------
>  [verse]
> +'git-checkout' [-f] [-m] <branch>
> +'git-checkout' [-f] [-b <new_branch> [-l]] [-m] [<commit-ish>]
>  'git-checkout' [-m] [<branch>] <paths>...
>  
>  DESCRIPTION
>  -----------
> ...
> +With the third form, this command does *not* switch branches.
> +Instead, it replaces the contents of the named paths in your
> +working tree from the index.  Here, the <branch> argument can be
>  used to specify a specific tree-ish to update the index for the
>  given paths before updating the working tree.

The 'restore from arbitrary tree-ish' form does not take -m as
far as I know.

Although it might be interesting to do a single-file three-way
merge, I do not think the command is _checkout_ anymore once it
starts doing that.

That is:

	$ git checkout -f master
	$ edit file.c
        $ git that-funny-command next file.c

would steal the version of file.c from 'next', and merge the
change your locally did on top of 'master', and put it in your
working tree and in the index.  Technically I can explain how
that work (and how it could be implemented -- which is trivial),
but I cannot explain what that operation _means_.

  reply	other threads:[~2006-12-21  7:47 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-12-21  6:53 [PATCH] Attempt to make git-checkout man page a bit more clear Sean
2006-12-21  7:47 ` Junio C Hamano [this message]
     [not found]   ` <20061221033100.b244573d.seanlkml@sympatico.ca>
2006-12-21  8:31     ` Sean
2006-12-21  9:34       ` Jakub Narebski

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

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=7vbqlx1yht.fsf@assigned-by-dhcp.cox.net \
    --to=junkio@cox$(echo .)net \
    --cc=git@vger$(echo .)kernel.org \
    --cc=seanlkml@sympatico$(echo .)ca \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox