From fb60f3d73ead83a44f9e9b47096b8474650a29d2 Mon Sep 17 00:00:00 2001 From: CleanMachine1 <78213164+CleanMachine1@users.noreply.github.com> Date: Wed, 12 May 2021 23:51:45 +0100 Subject: [PATCH] git-cp: add page (#5947) --- pages/common/git-cp.md | 13 +++++++++++++ 1 file changed, 13 insertions(+) create mode 100644 pages/common/git-cp.md diff --git a/pages/common/git-cp.md b/pages/common/git-cp.md new file mode 100644 index 000000000..1e5102ace --- /dev/null +++ b/pages/common/git-cp.md @@ -0,0 +1,13 @@ +# git cp + +> Copy an existing file to a new location, preserving history. +> Part of `git-extras`. +> More information: . + +- Copy an existing file in a Git repo, staying in the same directory: + +`git cp {{file}} {{new_file}}` + +- Copy an existing file in a Git repo and place it elsewhere: + +`git cp {{path/to/file}} {{path/to/new_file}}`