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}}`