From 2b8f4bdc94c90c540cbbd3018518cd47c597def0 Mon Sep 17 00:00:00 2001 From: Raul Piraces Alastuey Date: Tue, 11 Oct 2022 11:52:28 +0200 Subject: [PATCH] git-force-clone: add page (#8724) --- pages/common/git-force-clone.md | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) create mode 100644 pages/common/git-force-clone.md diff --git a/pages/common/git-force-clone.md b/pages/common/git-force-clone.md new file mode 100644 index 0000000000..8432d14ab3 --- /dev/null +++ b/pages/common/git-force-clone.md @@ -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: . + +- 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}}`