Last active
May 16, 2025 10:26
-
-
Save dannyroberts/857b9f7e52acd6b83c89 to your computer and use it in GitHub Desktop.
Revisions
-
dannyroberts revised this gist
Mar 17, 2015 . 1 changed file with 3 additions and 1 deletion.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -13,4 +13,6 @@ and, when you commit, it'll preserve this history of those files. Things that still work: - git blame - git merge with code that branched off before the renaming (incredible!) - you may have to set `merge.renamelimit` to something higher for this to work, i.e. `git config merge.renamelimit 4000` -
dannyroberts created this gist
Mar 17, 2015 .There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,16 @@ # Did you know... ...that git lets you move and rename whole directories while preserving the git history of those files? If you run ```bash git read-tree --prefix=$NEW_PATH -u master:$OLD_PATH rm -rf $OLD_PATH # ...you probably want to change some imports... git commit -m $MESSAGE ``` that will move the directory tree to the new location, and, when you commit, it'll preserve this history of those files. Things that still work: - git blame - git merge with code that branched off before the renaming (incredible!)