# history of a renamed file

4 messages from 2008-04-23 to 2008-04-23. Participants: Christoph Duelli, Jakub Narebski, Teemu Likonen.
Thread: https://gitlist.dev/t/13227

## Christoph Duelli, 2008-04-23 13:02

Subject: history of a renamed file
Message-ID: <480F3369.5080203@melosgmbh.de>
URL: https://gitlist.dev/e/480F3369.5080203%40melosgmbh.de

```
Given a repo that contains a file x.c
that got renamed from
some/path/x.c
to
new/location/x.c

Is it possible (ideally with gitk) to view the complete history of what 
is now new/location/x.c *including* the history of changes that occurred 
when it stil was some/path/x.c?
When I say "gitk new/location/x.c" I get just the changes made starting 
with the rename.
When I call "gitk" and look for the changeset, the rename is detected, 
though. Therefore I hope that it is somehow possible to obtain the 
complete file-specific history without truncation at renames.

Any ideas?

Thank you, best regards
Christoph

```

## Jakub Narebski, 2008-04-23 13:25

Subject: Re: history of a renamed file
Message-ID: <m3y774putc.fsf@localhost.localdomain>
URL: https://gitlist.dev/e/m3y774putc.fsf%40localhost.localdomain
In-Reply-To: <480F3369.5080203@melosgmbh.de>

```
Christoph Duelli <duelli@melosgmbh.de> writes:

> Given a repo that contains a file x.c
> that got renamed from
>   some/path/x.c
> to
>   new/location/x.c
> 
> Is it possible (ideally with gitk) to view the complete history of
> what is now new/location/x.c *including* the history of changes that
> occurred when it stil was some/path/x.c?
> When I say "gitk new/location/x.c" I get just the changes made
> starting with the rename.
> When I call "gitk" and look for the changeset, the rename is detected,
> though. Therefore I hope that it is somehow possible to obtain the
> complete file-specific history without truncation at renames.
> 
> Any ideas?

Try --follow option, see git-log(1), although I'm not sure if gitk
supports it (it should).

-- 
Jakub Narebski
Poland
ShadeHawk on #git

```

## Christoph Duelli, 2008-04-23 13:45

Subject: Re: history of a renamed file
Message-ID: <480F3D63.1040809@melosgmbh.de>
URL: https://gitlist.dev/e/480F3D63.1040809%40melosgmbh.de
In-Reply-To: <m3y774putc.fsf@localhost.localdomain>

```
Jakub Narebski schrieb:
> Christoph Duelli <duelli@melosgmbh.de> writes:
> 
>> Given a repo that contains a file x.c
>> that got renamed from
>>   some/path/x.c
>> to
>>   new/location/x.c
>>
>> Is it possible (ideally with gitk) to view the complete history of
>> what is now new/location/x.c *including* the history of changes that
>> occurred when it stil was some/path/x.c?
>> When I say "gitk new/location/x.c" I get just the changes made
>> starting with the rename.
>> When I call "gitk" and look for the changeset, the rename is detected,
>> though. Therefore I hope that it is somehow possible to obtain the
>> complete file-specific history without truncation at renames.
>>
>> Any ideas?
> 
> Try --follow option, see git-log(1), although I'm not sure if gitk
> supports it (it should).
Works, thank you!

-- 
Christoph Duelli

```

## Teemu Likonen, 2008-04-23 14:05

Subject: Re: history of a renamed file
Message-ID: <20080423140526.GC3291@mithlond.arda.local>
URL: https://gitlist.dev/e/20080423140526.GC3291%40mithlond.arda.local
In-Reply-To: <m3y774putc.fsf@localhost.localdomain>

```
Jakub Narebski wrote (2008-04-23 06:25 -0700):

> Christoph Duelli <duelli@melosgmbh.de> writes:
> 
> > Is it possible (ideally with gitk) to view the complete history of
> > what is now new/location/x.c *including* the history of changes that
> > occurred when it stil was some/path/x.c?

> Try --follow option, see git-log(1), although I'm not sure if gitk
> supports it (it should).

gitk certainly accepts '--follow' but the option does not work as
expected. For example try

  gitk --follow -- utf8.c

in the Git repository and get surprised. :-)

I noticed the problem two weeks ago and Adam Simpkins elaborated it
a bit. See http://thread.gmane.org/gmane.comp.version-control.git/79008

```
