Skip site navigation (1)Skip section navigation (2)

FreeBSD Manual Pages

  
 
  

home | help
GIT-FORCE-CLONE(1)		  Git Extras		    GIT-FORCE-CLONE(1)

NAME
       git-force-clone - overwrite local repositories with clone

SYNOPSIS
       force-clone    --help   force-clone   {remote_url}   {destination_path}
       force-clone --branch {branch_name} {remote_url} {destination_path}

DESCRIPTION
       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.

       Because it doesn't actually delete the directory, it is usually signif-
       icantly	faster	than  the  alternative	of  deleting the directory and
       cloning the repository from scratch.

       CAUTION:	If the repository exists, this will destroy  all  local	 work:
       changed	files  will be reset, local branches and other remotes will be
       removed.

PROCESS
       If target-directory doesn't exist or isn't a git	 repository  then  the
       arguments will simply be	passed through to git clone.

       If target-directory exists and is a git repository then this will:

       o   Remove all remotes

       o   Set the origin remote to {remote_url} and fetch the remote

       o   Discover the	default	branch,	if no branch was specified

       o   Check out the selected branch

       o   Delete all other local branches

OPTIONS
       {remote_url}  -	The URL	for a git remote repository of which to	make a
       clone. {destination_path} - A path to the local git repository location
       to  clone  into.	 --branch {branch_name}	- After	cloning, checkout this
       branch.

EXAMPLES
       git-force-clone -b master git@github.com:me/repo.git ./repo_dir

AUTHOR
       Written by Robin	Winslow	robin@robinwinslow.co.uk.

REPORTING BUGS
       https://github.com/tj/git-extras/issues

SEE ALSO
       https://github.com/tj/git-extras

				 October 2017		    GIT-FORCE-CLONE(1)

NAME | SYNOPSIS | DESCRIPTION | PROCESS | OPTIONS | EXAMPLES | AUTHOR | REPORTING BUGS | SEE ALSO

Want to link to this manual page? Use this URL:
<https://www.freebsd.org/cgi/man.cgi?query=git-force-clone&sektion=1&manpath=FreeBSD+12.1-RELEASE+and+Ports>

home | help