git clone from another directory

前端 未结 8 1897
一生所求
一生所求 2020-12-04 07:38

I am trying to clone repo from another directory.

Lets say I have one repo in C:/folder1 and C:/folder2

I want to clone the work in

相关标签:
8条回答
  • 2020-12-04 08:27

    Use git clone c:/folder1 c:/folder2

    git clone [--template=<template_directory>] [-l] [-s] [--no-hardlinks]
    [-q] [-n] [--bare] [--mirror] [-o <name>] [-b <name>] [-u <upload-pack>]
    [--reference <repository>] [--separate-git-dir <git dir>] [--depth <depth>]
    [--[no-]single-branch] [--recursive|--recurse-submodules] [--]<repository>
    [<directory>]
    
    
    <repository>
    
        The (possibly remote) repository to clone from.
        See the URLS section below for more information on specifying repositories.
    <directory>
    
        The name of a new directory to clone into.
        The "humanish" part of the source repository is used if no directory 
        is explicitly given (repo for /path/to/repo.git and foo for host.xz:foo/.git).
        Cloning into an existing directory is only allowed if the directory is empty.
    
    0 讨论(0)
  • 2020-12-04 08:27

    I am using git-bash in windows.The simplest way is to change the path address to have the forward slashes:

    git clone C:/Dev/proposed 
    

    P.S: Start the git-bash on the destination folder.

    Path used in clone ---> c:/Dev/proposed

    Original path in windows ---> c:\Dev\proposed

    0 讨论(0)
提交回复
热议问题