RSS Amplifier

Pete Zaitcev · Dec 10, 2023

git cp orig copy

0
Sign in to vote or save

zaitcev.livejournal.com

? ?

LiveJournal

Problem: I want to copy a file in git and preserve its history.

Solution: Holy guacamole!:



git checkout -b dup

git mv orig copy

git commit --author="Greg

" -m "cp orig copy"

git checkout HEAD~ orig

git commit --author="Greg

" -m "restore orig"

git checkout -

git merge --no-ff dup


LJ Video

Read the original on zaitcev.livejournal.com

Comments

Nothing yet. Say the first thing.

    Sign in to join the conversation.