Skip to content

Instantly share code, notes, and snippets.

View ilanKeshet's full-sized avatar

Ilan Keshet ilanKeshet

View GitHub Profile
@ilanKeshet
ilanKeshet / git-mv-with-history
Last active January 3, 2023 16:37 — forked from emiller/git-mv-with-history
git utility to move/rename file or folder and retain history with it.
#!/bin/bash
#
# credit: foked from https://gist.github.com/emiller/6769886 emiller/git-mv-with-history
#
# git-mv-with-history -- move/rename file or folder, with history.
#
# Moving a file in git doesn't track history, so the purpose of this
# utility is best explained from the kernel wiki:
#
# Git has a rename command git mv, but that is just for convenience.