mirror of
https://github.com/Combodo/iTop.git
synced 2026-02-13 07:24:13 +01:00
339 B
339 B
git copy of one file into two files without loosing history
git mv foo bar
git commit
SAVED=`git rev-parse HEAD`
git reset --hard HEAD^
git mv foo copy
git commit
git merge $SAVED # This will generate conflicts
git commit -a # Trivially resolved like this
git mv copy foo
git commit
DO NOT SQUASH the branch NEVER !