Re: EasyGit Integration

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Fri, 12 Jun 2009, Felipe Contreras wrote:
> On Thu, Jun 11, 2009 at 3:42 AM, Jakub Narebski<jnareb@xxxxxxxxx> wrote:
>> On Thu, 11 June 2009, Felipe Contreras wrote:

>>> 'git reset' also gets something out of the repository and into the
>>> working area, that's not reason enough to put them under the same
>>> 'checkout' command, is it?
>>
>> Nope. 'git reset' resets something to the state in repository (to given
>> commit).  The fact that some combination of options for 'git reset' gives
>> the same result as some specific combination of options of 'git checkout'
>> means only that one can arrive at some destination in two different ways.
> 
> You can describe what 'git reset' does in many ways, but in the
> process it's still getting something out of the repository and into
> the working directory, does it not? 'git checkout <commitish>' and
> 'git checkout <commitish> -- <path>' also do that.

Nope. 'git reset' always reset some part of state to a given commit,
HEAD by default.  It can reset current branch with --soft, branch plus
index with --mixed (default), and branch plus index plus working 
directory with --hard.  Source is always commit.

'git checkout' however checks out something into working directory.
It can be branch, in which turns it sets HEAD to point to it, and
index too.  It can be file, in which it gets version of file from
index or (if specified) from given commit.  Destination is always
working area (and sometimes something else beside it).

> 
> Is that relevant? No. What is relevant is the final action the user is
> expecting to achieve.
> 
> Therefore, the fact that 'git checkout <commitish>' modifies the
> working directory is irrelevant, it's still doing an extra step;
> update HEAD, and that final action is what is important for this
> particular command; it switches to another commitish.

It is not uncommon for a word to have different meaning depending on
context, or on some auxiliary word used in addition...
-- 
Jakub Narebski
Poland
--
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]