git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* rm and mv commands: should I use them?
@ 2008-01-06  7:55 Jon Hancock
  2008-01-06  8:04 ` David Brown
                   ` (4 more replies)
  0 siblings, 5 replies; 11+ messages in thread
From: Jon Hancock @ 2008-01-06  7:55 UTC (permalink / raw)
  To: git

Hello list,
I'm fairly new to git and coming from svn and have tasted hg and bzr  
along the decision path.

Here's my newbie issue:

In reading Aristotle Pagaltzis's article http://plasmasturm.org/log/ 
487/  the author stresses that a major difference between git and  
something like bzr or svn is that git tracks content and not metadata  
(or at least less metadata); meaning is inferred through content and  
less through metadata.

The heart of Pagaltzis's argument copied here:
<COPY>
Among the systems I did look into, there are really just two  
contenders: git and Mercurial. All the other systems track metadata;  
git and hg just track content and infer the metadata.

By tracking metadata I mean that these systems keep a record of what  
steps were taken. “This file had its name changed.” “Those  
modifications came from that file in that branch.” “This file was  
copied from that file.” Tracking content alone means doing none of  
that. When you commit, the VCS just records what the tree looks like.  
It doesn’t care about how the tree got that way. When you ask it about  
two revisions, it looks at the tree beforehand and the tree  
afterwards, and figures out what happened inbetween. A file is not a  
unit that defines any sort of boundary in this view. The VCS always  
looks at entire trees; files have no individual identity separate from  
their trees at all.

As a consequence, whether you used VCS tools to manipulate your  
working copy or regular command line utilities or applied a patch or  
whatever is irrelevant. The resulting history is always the same.
</COPY>

So, do I need to use git's mv and rm commands?  Can't I just rename,  
add, and remove files using any means I like and then just ensure my  
"index" is staged properly when I do a commit?  Additionally, is there  
a simple procedure with git to say: "I want to version exactly what is  
in my working tree.  If I removed something or added something, just  
handle it".  This is sort of what "git add ." does, but "git add"  
doesn't handling things I removed or moved, correct?

thanks, Jon

^ permalink raw reply	[flat|nested] 11+ messages in thread

end of thread, other threads:[~2008-01-07 18:38 UTC | newest]

Thread overview: 11+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-01-06  7:55 rm and mv commands: should I use them? Jon Hancock
2008-01-06  8:04 ` David Brown
2008-01-06  8:08 ` Brian Swetland
2008-01-06  8:08 ` Jeff King
2008-01-06 19:22 ` Linus Torvalds
2008-01-07  1:55   ` Jeff King
2008-01-07  2:05     ` Junio C Hamano
2008-01-07  3:06       ` Jeff King
2008-01-07 18:37         ` Robin Rosenberg
2008-01-07  3:05 ` Jay Soffian
2008-01-07  5:01   ` David Brown

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 NNTP newsgroup(s).