1

I have a folder in my repository where i have only create or delete files or subfolders, but never rename them. But git often interprets in one commit deleting a file and creating another file like renaming. How can i get rid of such behavior?

  1. Does "git commit" have parameter to restrict this in one particular commit?
  2. i use tortoisegit.Does it has a setting for a folder of repository to do restrict this
  3. Does such setting exist for entire repository? I would be worse of course, but if two previous variants don't work, it will be acceptable
Nbilov
  • 23
  • 3
  • 2
    https://stackoverflow.com/a/46807414/7976758 `git log --no-renames` , https://stackoverflow.com/a/46986531/7976758 `git config diff.renames false` Found in https://stackoverflow.com/search?q=%5Bgit%5D+turn+off+rename+detection – phd Aug 28 '23 at 21:18
  • 1
    `git log/diff -M100` See https://stackoverflow.com/search?q=%5Bgit%5D+rename+similarity+index – phd Aug 28 '23 at 21:21
  • 2
    that is an _inference_ git does from how similar the files are _but_ it's actually not something git tracks _per commit_.... it's done _on the fly_ when you are executing a git operation (like merge, diff, etc).... I would say there is no need to worry about it. – eftshift0 Aug 28 '23 at 22:02
  • Thanks. I can't use any modifications in git log , because i only view history of repository by tortoisegit with it's menu in user interface. But that variant with git config I hope will do what i wanted. I am going to check it next week – Nbilov Aug 29 '23 at 16:46

0 Answers0