Last active
December 15, 2020 17:01
-
-
Save trddddd/69f1f134499b4e1aaf84166911a2830c to your computer and use it in GitHub Desktop.
how to mv git with history
This file contains 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 characters
problem https://dev.to/nickytonline/renaming-a-file-via-git-after-it-has-been-deleted-in-a-pr-41dn | |
1. git filter-branch -f --tree-filter 'if [ -f old_file ]; then mkdir -p new_dir && mv old_file new_file; fi' | |
2. mv old_file new_file | |
3. gaa && gcmsg 'perfect' |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment