Compare commits

..

1 Commits

  1. 8
      content/post/renames-in-git-explained.md

@ -122,7 +122,7 @@ notion of this action. It's just has content and a structure for that content.
However, that does not mean you lose your history when you rename a file. However, that does not mean you lose your history when you rename a file.
### How to see history of a renamed file ## How to see history of a renamed file
Git might not store information on renames in it repository but it does come Git might not store information on renames in it repository but it does come
packed with an algorithm that detects file renames. For every add/delete pair packed with an algorithm that detects file renames. For every add/delete pair
@ -143,14 +143,14 @@ for the correct syntax.
You can also turn off rename detection by doing `--no-renames` You can also turn off rename detection by doing `--no-renames`
### Rename best practice ## Rename best practice
Because of the treshold and the cheapness of commits, it is recommended that Because of the treshold and the cheapness of commits, it is recommended that
when you rename a file/directory. You commit those renames first, before you when you rename a file/directory. You commit those renames first, before you
continue working on the renamed file. This basically makes it so you can use continue working on the renamed file. This basically makes it so you can use
a treshold of 100% all the time. a treshold of 100% all the time.
### Why did Git do it this way ## Why did Git do it this way
This is pure speculation, but here's my thoughts on it: This is pure speculation, but here's my thoughts on it:
@ -177,7 +177,7 @@ me it seems completely irrelevant now. Instead of having a command which can be
forgotten and for which we need contigency, just use the contigency as the forgotten and for which we need contigency, just use the contigency as the
solution! It makes the behaviour a lot more consistent! solution! It makes the behaviour a lot more consistent!
### Can I fix my commit if I did change a lot of content after renaming ## Can I fix my commit if I did change a lot of content after renaming
First, to prevent this: always check using `git status` whether are not the First, to prevent this: always check using `git status` whether are not the
rename is being detected. Now, how to solve it? rename is being detected. Now, how to solve it?

Loading…
Cancel
Save