Skip to content

Commit

Permalink
git-cp: add page (#5947)
Browse files Browse the repository at this point in the history
  • Loading branch information
CleanMachine1 authored May 12, 2021
1 parent 94b99d3 commit fb60f3d
Showing 1 changed file with 13 additions and 0 deletions.
13 changes: 13 additions & 0 deletions pages/common/git-cp.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
# git cp

> Copy an existing file to a new location, preserving history.
> Part of `git-extras`.
> More information: <https://github.com/tj/git-extras/blob/master/Commands.md#git-cp>.
- 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}}`

0 comments on commit fb60f3d

Please sign in to comment.