Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
how to mv git with history
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
You can’t perform that action at this time.