GIT-CP(1)

πŸ’– GIT-CP β€” bestie, let's copy a file WITHOUT losing its whole story πŸ’–

okay so this is git-cp, straight out of Git Extras (that's the manual name, now you know 🫢). She's a tiny icon, but she does something git itself lowkey refuses to do nicely, and honestly? we stan.


✨ NAME ✨

git-cp β€” copy a file, but keep its history intact πŸŽ€


🌸 SYNOPSIS 🌸

git-cp <current_filename> <destination_filename>

Two args, that's it. current is the one you already have, destination is the shiny new copy. No cap.


πŸ¦‹ DESCRIPTION πŸ¦‹

So here's the tea: git-cp copies a file while keeping its git history. Not me being dramatic, that's literally the whole job description πŸ’….

And why do you care? Because keeping the history means it makes merge conflict handling possible. Yes bestie, the vibes stay connected, the blame log stays valid, the past doesn't just get deleted like a bad group chat. Iconic behaviour, truly.


πŸ“ EXAMPLES πŸ“

Let's say you wanna copy README into README.txt β€” watch her cook:

$ git cp README README.txt

Slayed. Effortlessly. ✨


πŸ‘‘ AUTHOR πŸ‘‘

Written by RΓ©my Hubscher <hubscher.remy@gmail.com> β€” give the author their flowers, this person ate πŸ’


πŸ’€ REPORTING BUGS πŸ’€

Found something cursed? (affectionately) Go tell the devs here:

https://github.com/tj/git-extras/issues
no gatekeeping, no lurking, just report it fr fr πŸ™ˆ

🌈 SEE ALSO 🌈


and that's the whole page bestie, you're officially fluent in git-cp now πŸ’œ

this lil manual is part of Git Extras, and the version on deck is dated May 2026 ⭐ go copy something and keep its history, periodt. πŸŽ€πŸ’–πŸ¦‹

πŸ“¦ where this page comes from