Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 9274681
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 18, 20262026-06-18T16:24:35+00:00 2026-06-18T16:24:35+00:00

First the question : Is there any tool or patch to git that makes

  • 0

First the question:

Is there any tool or patch to git that makes it specifically store metadata about file renames (much like git-svn does with “git-svn-id”)?
Failing this, is there another DVCS that gives me fast local branches (like git) and proper file rename tracking (like bazaar)?

Now some background as to why I need this:

I started using git for a few months and I really like it. Except for the fact that it doesn’t track renames.

In my opinion, the decision not to track renames is based on the faulty assumption that it’s the content that matters, not the name. I disagree. Let me give you a real-world example.

I had a class RefinementPresentation which was used as a model in the view template of a web page. I move the class to a separate package (model) and then, because the class was more than simply a model and contained heavy logic, I refactored it by moving the logic to another class. As you can imagine, now the class bears little resemblance to the original class. But conceptually, it’s the same thing – it’s still the model for the view. And that is my point. Whether the file is the same file (renamed/moved) or a different file is a concept in my head, and no tool can or should attempt to do it for me. Being so different, no amount of heuristics or guessing will make git recognize that this is actually a moved file. Which means git log will never show me the history past move. Of course, the history is still there – it’s not lost – it’s simply harder to get to. Thus my question: is there a way to not have this inconvenience?

EDIT: move and refactor in separate commits is a good workaround, see comments below (thanks Eevee!).

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-18T16:24:36+00:00Added an answer on June 18, 2026 at 4:24 pm

    Least effort, greatest reward: move and refactor the file in separate commits.

    For what it’s worth, git isn’t totally crazy here and has various sensible reasons for what it does—not that it’s much consolation. 🙂

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

It's my first question on SO. I know that there were many topics on
First question is, Am I on the right path?.ıs there a better way to
Hello there Stack Overflow, I hope you'll help me with my very first question
First of all there is probably a question like this already but i couldn't
First of all: I do know that there are already many questions and answers
Are there any intelligent or learning engines out there, that are able to identify
this is my first question here @stackoverflow. I'm writing a monitoring tool for some
First of all, if there is already such a question like mine on the
first I'd like to explain the situation/requirements that lead to the question: In our
I have no idea about any building tool like Ant, Maven, or Gradle. This

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.