Skip to content

Instantly share code, notes, and snippets.

@trddddd
Last active December 15, 2020 17:01
Show Gist options
  • Star 2 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save trddddd/69f1f134499b4e1aaf84166911a2830c to your computer and use it in GitHub Desktop.
Save trddddd/69f1f134499b4e1aaf84166911a2830c to your computer and use it in GitHub Desktop.
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