I am trying to post sequential snapshots of a specific project in git stories. I do this by populating the repository directory with the contents of each snapshot, and then running
git add -A . git commit -m 'Version X'
This is the method recommended in this answer . However, I see that commit recognizes file renaming only when 100% of the contents of the file remains unchanged. Is there a way to influence the definition of git commit renaming to find renames where the contents of the file have changed a bit? I see that git merge and git diff have different options for controlling the rename threshold, but these options do not exist for git commit .
Things I tried:
- Search for renamed files using the homebrew script and commit with the source files renamed to their new locations before transferring the new contents of the file. However, this introduces an artificial commit and seems inelegant as it does not use the git rename functionality.
Create a separate branch for each snapshot, and then merge consecutive branches into master using
git merge -s recursive -Xtheirs -Xpatience -Xrename-threshold=20
However, this left me with the renamed files of the old version in place, and also could not detect the renames.
source share