Skip to content

Commit

Permalink
git-force-clone: add page (#8724)
Browse files Browse the repository at this point in the history
  • Loading branch information
piraces committed Oct 11, 2022
1 parent f561687 commit 2b8f4bd
Showing 1 changed file with 17 additions and 0 deletions.
17 changes: 17 additions & 0 deletions pages/common/git-force-clone.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
# git force-clone

> Provides the basic functionality of `git clone`, but if the destination git repository already exists it will force-reset it to resemble a clone of the remote.
> Part of `git-extras`.
> More information: <https://github.com/tj/git-extras/blob/master/Commands.md#git-force-clone>.
- Clone a Git repository into a new directory:

`git force-clone {{remote_repository_location}} {{path/to/directory}}`

- Clone a Git repository into a new directory, checking out an specific branch:

`git force-clone -b {{branch_name}} {{remote_repository_location}} {{path/to/directory}}`

- Clone a Git repository into an existing directory of a Git repository, performing a force-reset to resemble it to the remote and checking out an specific branch:

`git force-clone -b {{branch_name}} {{remote_repository_location}} {{path/to/directory}}`

0 comments on commit 2b8f4bd

Please sign in to comment.