[OT?] Moving files with git, without losing history.

View: New views
3 Messages — Rating Filter:   Alert me  

[OT?] Moving files with git, without losing history.

by Charles Plessy-12 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Dear Mentors,

Although it is not really a Debian question, it is for a package that I try to
convert to git…

Despite it is written everywhere that Git automagically understands renames, if
I move a file and do ‘git log’ on it, I do not see its history anymore. In
contrary to what is documented on the interweb, adding --follow or setting
diff.renames to true never worked in my hands.

Any suggestion ?

Have a nice day,

--
Charles Plessy
Debian Med packaging team,
http://www.debian.org/devel/debian-med
Tsurumi, Kanagawa, Japan


--
To UNSUBSCRIBE, email to debian-mentors-REQUEST@...
with a subject of "unsubscribe". Trouble? Contact listmaster@...


Re: [OT?] Moving files with git, without losing history.

by Paul Wise-3 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

On Tue, Nov 3, 2009 at 12:29 PM, Charles Plessy <plessy@...> wrote:

> Although it is not really a Debian question, it is for a package that I try to
> convert to git…

You're probably much better off asking about this on #git on Freenode
or the mailing list:

git@...
http://news.gmane.org/gmane.comp.version-control.git

--
bye,
pabs

http://wiki.debian.org/PaulWise


--
To UNSUBSCRIBE, email to debian-mentors-REQUEST@...
with a subject of "unsubscribe". Trouble? Contact listmaster@...


Re: [OT?] Moving files with git, without losing history.

by Luca Bruno-7 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Charles Plessy scrisse:

> Despite it is written everywhere that Git automagically understands
> renames, if I move a file and do ‘git log’ on it, I do not see its
> history anymore. In contrary to what is documented on the interweb,
> adding --follow or setting diff.renames to true never worked in my
> hands.
> Any suggestion ?

Try with options -M, -C or --diff-filter=<mode> which detect copies and
renames (see `git log --help`).

Ciao, Luca

--
 .''`.  ** Debian GNU/Linux **  | Luca Bruno (kaeso)
: :'  :   The Universal O.S.    | lucab (AT) debian.org
`. `'`   | GPG Key ID: 3BFB9FB3
  `-     http://www.debian.org  | Debian GNU/Linux Developer


attachment0 (205 bytes) Download Attachment