Re: [git-users] Re: git checkout . overwrites all my changes

2012-07-12 Thread Serge Matveenko
On Thu, Jul 12, 2012 at 6:32 PM, Thomas Ferris Nicolaisen
tfn...@gmail.com wrote:
 In essence, checkout is the equivalent of what some other systems call
 revert, and you have to get used to treating it with respect (as with any
 git command).

IMHO, it looks more like switch usually.


-- 
Serge Matveenko
se...@matveenko.ru
http://www.ohloh.net/accounts/lig
http://ru.linkedin.com/in/sergematveenko

-- 
You received this message because you are subscribed to the Google Groups Git 
for human beings group.
To post to this group, send email to git-users@googlegroups.com.
To unsubscribe from this group, send email to 
git-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/git-users?hl=en.



Re: [git-users] Re: git checkout . overwrites all my changes

2012-07-12 Thread Konstantin Khomoutov
On Thu, 12 Jul 2012 18:36:48 +0400
Serge Matveenko se...@matveenko.ru wrote:

  In essence, checkout is the equivalent of what some other systems
  call revert, and you have to get used to treating it with respect
  (as with any git command).
 IMHO, it looks more like switch usually.

I wonder what SCM system you have in mind saying this.

Mercurial and Fossil use revert to achieve what's being discussed.

And I know one SCM which uses the switch subcommand--that's
Subversion, and it uses `svn switch` for changing branches under the
local checkout.

-- 
You received this message because you are subscribed to the Google Groups Git 
for human beings group.
To post to this group, send email to git-users@googlegroups.com.
To unsubscribe from this group, send email to 
git-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/git-users?hl=en.



Re: [git-users] Re: git checkout . overwrites all my changes

2012-07-12 Thread Thomas Ferris Nicolaisen
On Thursday, July 12, 2012 5:27:59 PM UTC+2, Peter J Weisberg wrote:

 The first one works like 'svn revert'; the second one works like 'svn 
 switch'.  Hence, checkout works like switch usually (for certain 
 values of usually, dependent on your usage patterns). 

 I haven't looked at Git's innards, but to me those look like two 
 completely different commands that happen to be spelled exactly the 
 same.  Not a good idea, generally.  It doesn't help that one usage is 
 careful to not overwrite any of your modified files, and the other 
 usage is specifically intended to overwrite your modified files. 


Yeah, these are one of the git commands that have more forms of operation 
(git reset is another). Both forms take stuff out of the repository/index 
and put it in the work-tree, and that's whey share the same command. It *kinda 
*makes sense, although I can certainly understand that some find it 
confusing.

-- 
You received this message because you are subscribed to the Google Groups Git 
for human beings group.
To view this discussion on the web visit 
https://groups.google.com/d/msg/git-users/-/Nq7NEOwgJ9IJ.
To post to this group, send email to git-users@googlegroups.com.
To unsubscribe from this group, send email to 
git-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/git-users?hl=en.