From mboxrd@z Thu Jan 1 00:00:00 1970 From: "Aaron Gray" Subject: Re: renaming question Date: Sun, 19 Aug 2007 20:17:31 +0100 Message-ID: <03bd01c7e295$976a2970$0600a8c0@ze4427wm> References: <03a701c7e28a$87914fc0$0600a8c0@ze4427wm><87vebbo0f1.fsf@mid.deneb.enyo.de><03b401c7e28f$3c7304c0$0600a8c0@ze4427wm> <85sl6fqr9n.fsf@lola.goethe.zz> Mime-Version: 1.0 Content-Type: text/plain; format=flowed; charset="iso-8859-1"; reply-type=original Content-Transfer-Encoding: 7bit To: X-From: git-owner@vger.kernel.org Sun Aug 19 21:17:41 2007 Return-path: Envelope-to: gcvg-git@gmane.org Received: from vger.kernel.org ([209.132.176.167]) by lo.gmane.org with esmtp (Exim 4.50) id 1IMqHM-0001Fl-JB for gcvg-git@gmane.org; Sun, 19 Aug 2007 21:17:40 +0200 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752268AbXHSTRh (ORCPT ); Sun, 19 Aug 2007 15:17:37 -0400 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1752684AbXHSTRh (ORCPT ); Sun, 19 Aug 2007 15:17:37 -0400 Received: from lon1-mail-1.visp.demon.net ([193.195.70.4]:20656 "ehlo lon1-mail-1.visp.demon.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752193AbXHSTRg (ORCPT ); Sun, 19 Aug 2007 15:17:36 -0400 Received: from mwgray.force9.co.uk (EHLO ze4427wm) ([212.159.110.144]) by lon1-mail-1.visp.demon.net (MOS 3.7.5a-GA FastPath) with ESMTP id FKT55642 (AUTH angray); Sun, 19 Aug 2007 20:17:35 +0100 (BST) X-Priority: 3 X-MSMail-Priority: Normal X-Mailer: Microsoft Outlook Express 6.00.2900.3138 X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.3138 Sender: git-owner@vger.kernel.org Precedence: bulk X-Mailing-List: git@vger.kernel.org Archived-At: > "Aaron Gray" writes: > >>>* Aaron Gray: >>> >>>> I have a very large C source project that I am converting from C to >>>> C++. >>>> >>>> Is it posssible to track changes with renamed files in GIT ? >>> >>> You don't need to rename the files if you compile them using g++. If >>> you still want to rename them, most history-related GIT commands >>> accept an -M switch which enables rename ("move") detection. >> >> For sanity they have to be renamed. >> >> I am a bit of a GIT newbie. With the -M switch what would be the >> proceedure with a single file conversion such as with test.c and >> test.cpp ? >> >> Would the following do the trick ? >> >> git add test.c >> git commit >> >> rename test.c test.cpp * >> vi test.cpp >> >> git rm test.c >> git add test.cpp >> git commit -M >> >> Many thanks in advance, > > There is no such thing as "git commit -M". git does not keep track of > renames. It generates the rename info on the fly when you ask it for > patches, log stats, blame annotations or similar. Could you elaborate maybe with a rough example for generating patches. Aaron