Re: svn versus git

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

 



[...]
>> svn revert::
>> Restore pristine working copy file (undo most local edits).
>> git reset --hard::
>> Reset the repository to an arbitrary point in the past, updating the
>> working copy as well.
>> git checkout -f HEAD <file>::
>> Checks out <file> from HEAD, forcing an overwrite of any working
>> directory changes to that file.
>> 
>> Draw.  There is no easy way to undo changes that have already been
>> committed to a subversion repository, so git would win.  However, it's
>> uncomfortable to revert a single file using checkout.
>
> There was talk about adding "git reset [<commit-ish>] -- <file>".
>

I would appreciate this. The first thing which comes to my mind if I
have to actualy revert a change I made was

	git reset file

After that didn't work I figured out I have to use the seperating -- and typed

	git reset -- file

and that didn't work, too. After several hours (ok, I'am just
exaggerating, it took me only about 15 minutes) reading manpages I figured out
that I have to use   git checkout [<revision>] -- file

After putting some thought into the mental model behind git checkout -- file
this command it looks obvious and understantable, but in _my_ mental modell

	git reset [<revision] -- file

would be a much better fit.

-Peter

-
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]