Git clone в текущую папку windows

-l
—local

When the repository to clone from is on a local machine,
this flag bypasses the normal «Git aware» transport
mechanism and clones the repository by making a copy of
HEAD and everything under objects and refs directories.
The files under .git/objects/ directory are hardlinked
to save space when possible.

If the repository is specified as a local path (e.g., /path/to/repo),
this is the default, and —local is essentially a no-op. If the
repository is specified as a URL, then this flag is ignored (and we
never use the local optimizations). Specifying --no-local will
override the default when /path/to/repo is given, using the regular
Git transport instead.

If the repository’s $GIT_DIR/objects has symbolic links or is a
symbolic link, the clone will fail. This is a security measure to
prevent the unintentional copying of files by dereferencing the symbolic
links.

NOTE: this operation can race with concurrent modification to the
source repository, similar to running cp -r src dst while modifying
src.

—no-hardlinks

Force the cloning process from a repository on a local
filesystem to copy the files under the .git/objects
directory instead of using hardlinks. This may be desirable
if you are trying to make a back-up of your repository.

-s
—shared

When the repository to clone is on the local machine,
instead of using hard links, automatically setup
.git/objects/info/alternates to share the objects
with the source repository. The resulting repository
starts out without any object of its own.

NOTE: this is a possibly dangerous operation; do not use
it unless you understand what it does. If you clone your
repository using this option and then delete branches (or use any
other Git command that makes any existing commit unreferenced) in the
source repository, some objects may become unreferenced (or dangling).
These objects may be removed by normal Git operations (such as git commit)
which automatically call git maintenance run --auto. (See
git-maintenance[1].) If these objects are removed and were referenced
by the cloned repository, then the cloned repository will become corrupt.

Note that running git repack without the --local option in a repository
cloned with --shared will copy objects from the source repository into a pack
in the cloned repository, removing the disk space savings of clone --shared.
It is safe, however, to run git gc, which uses the --local option by
default.

If you want to break the dependency of a repository cloned with --shared on
its source repository, you can simply run git repack -a to copy all
objects from the source repository into a pack in the cloned repository.

—reference[-if-able] <repository>

If the reference repository is on the local machine,
automatically setup .git/objects/info/alternates to
obtain objects from the reference repository. Using
an already existing repository as an alternate will
require fewer objects to be copied from the repository
being cloned, reducing network and local storage costs.
When using the --reference-if-able, a non existing
directory is skipped with a warning instead of aborting
the clone.

NOTE: see the NOTE for the --shared option, and also the
--dissociate option.

—dissociate

Borrow the objects from reference repositories specified
with the --reference options only to reduce network
transfer, and stop borrowing from them after a clone is made
by making necessary local copies of borrowed objects. This
option can also be used when cloning locally from a
repository that already borrows objects from another
repository—​the new repository will borrow objects from the
same repository, and this option can be used to stop the
borrowing.

-q
—quiet

Operate quietly. Progress is not reported to the standard
error stream.

-v
—verbose

Run verbosely. Does not affect the reporting of progress status
to the standard error stream.

—progress

Progress status is reported on the standard error stream
by default when it is attached to a terminal, unless --quiet
is specified. This flag forces progress status even if the
standard error stream is not directed to a terminal.

—server-option=<option>

Transmit the given string to the server when communicating using
protocol version 2. The given string must not contain a NUL or LF
character. The server’s handling of server options, including
unknown ones, is server-specific.
When multiple --server-option=<option> are given, they are all
sent to the other side in the order listed on the command line.

-n
—no-checkout

No checkout of HEAD is performed after the clone is complete.

—[no-]reject-shallow

Fail if the source repository is a shallow repository.
The clone.rejectShallow configuration variable can be used to
specify the default.

—bare

Make a bare Git repository. That is, instead of
creating <directory> and placing the administrative
files in <directory>/.git, make the <directory>
itself the $GIT_DIR. This obviously implies the --no-checkout
because there is nowhere to check out the working tree.
Also the branch heads at the remote are copied directly
to corresponding local branch heads, without mapping
them to refs/remotes/origin/. When this option is
used, neither remote-tracking branches nor the related
configuration variables are created.

—sparse

Employ a sparse-checkout, with only files in the toplevel
directory initially being present. The
git-sparse-checkout[1] command can be used to grow the
working directory as needed.

—filter=<filter-spec>

Use the partial clone feature and request that the server sends
a subset of reachable objects according to a given object filter.
When using --filter, the supplied <filter-spec> is used for
the partial clone filter. For example, --filter=blob:none will
filter out all blobs (file contents) until needed by Git. Also,
--filter=blob:limit=<size> will filter out all blobs of size
at least <size>. For more details on filter specifications, see
the --filter option in git-rev-list[1].

—also-filter-submodules

Also apply the partial clone filter to any submodules in the repository.
Requires --filter and --recurse-submodules. This can be turned on by
default by setting the clone.filterSubmodules config option.

—mirror

Set up a mirror of the source repository. This implies --bare.
Compared to --bare, --mirror not only maps local branches of the
source to local branches of the target, it maps all refs (including
remote-tracking branches, notes etc.) and sets up a refspec configuration such
that all these refs are overwritten by a git remote update in the
target repository.

-o <name>
—origin <name>

Instead of using the remote name origin to keep track of the upstream
repository, use <name>. Overrides clone.defaultRemoteName from the
config.

-b <name>
—branch <name>

Instead of pointing the newly created HEAD to the branch pointed
to by the cloned repository’s HEAD, point to <name> branch
instead. In a non-bare repository, this is the branch that will
be checked out.
--branch can also take tags and detaches the HEAD at that commit
in the resulting repository.

-u <upload-pack>
—upload-pack <upload-pack>

When given, and the repository to clone from is accessed
via ssh, this specifies a non-default path for the command
run on the other end.

—template=<template-directory>

Specify the directory from which templates will be used;
(See the «TEMPLATE DIRECTORY» section of git-init[1].)

-c <key>=<value>
—config <key>=<value>

Set a configuration variable in the newly-created repository;
this takes effect immediately after the repository is
initialized, but before the remote history is fetched or any
files checked out. The key is in the same format as expected by
git-config[1] (e.g., core.eol=true). If multiple
values are given for the same key, each value will be written to
the config file. This makes it safe, for example, to add
additional fetch refspecs to the origin remote.

Due to limitations of the current implementation, some configuration
variables do not take effect until after the initial fetch and checkout.
Configuration variables known to not take effect are:
remote.<name>.mirror and remote.<name>.tagOpt. Use the
corresponding --mirror and --no-tags options instead.

—depth <depth>

Create a shallow clone with a history truncated to the
specified number of commits. Implies --single-branch unless
--no-single-branch is given to fetch the histories near the
tips of all branches. If you want to clone submodules shallowly,
also pass --shallow-submodules.

—shallow-since=<date>

Create a shallow clone with a history after the specified time.

—shallow-exclude=<revision>

Create a shallow clone with a history, excluding commits
reachable from a specified remote branch or tag. This option
can be specified multiple times.

—[no-]single-branch

Clone only the history leading to the tip of a single branch,
either specified by the --branch option or the primary
branch remote’s HEAD points at.
Further fetches into the resulting repository will only update the
remote-tracking branch for the branch this option was used for the
initial cloning. If the HEAD at the remote did not point at any
branch when --single-branch clone was made, no remote-tracking
branch is created.

—no-tags

Don’t clone any tags, and set
remote.<remote>.tagOpt=--no-tags in the config, ensuring
that future git pull and git fetch operations won’t follow
any tags. Subsequent explicit tag fetches will still work,
(see git-fetch[1]).

Can be used in conjunction with --single-branch to clone and
maintain a branch with no references other than a single cloned
branch. This is useful e.g. to maintain minimal clones of the default
branch of some repository for search indexing.

—recurse-submodules[=<pathspec>]

After the clone is created, initialize and clone submodules
within based on the provided pathspec. If no pathspec is
provided, all submodules are initialized and cloned.
This option can be given multiple times for pathspecs consisting
of multiple entries. The resulting clone has submodule.active set to
the provided pathspec, or «.» (meaning all submodules) if no
pathspec is provided.

Submodules are initialized and cloned using their default settings. This is
equivalent to running
git submodule update --init --recursive <pathspec> immediately after
the clone is finished. This option is ignored if the cloned repository does
not have a worktree/checkout (i.e. if any of --no-checkout/-n, --bare,
or --mirror is given)

—[no-]shallow-submodules

All submodules which are cloned will be shallow with a depth of 1.

—[no-]remote-submodules

All submodules which are cloned will use the status of the submodule’s
remote-tracking branch to update the submodule, rather than the
superproject’s recorded SHA-1. Equivalent to passing --remote to
git submodule update.

—separate-git-dir=<git-dir>

Instead of placing the cloned repository where it is supposed
to be, place the cloned repository at the specified directory,
then make a filesystem-agnostic Git symbolic link to there.
The result is Git repository can be separated from working
tree.

-j <n>
—jobs <n>

The number of submodules fetched at the same time.
Defaults to the submodule.fetchJobs option.

<repository>

The (possibly remote) repository to clone from. See the
GIT 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.

—bundle-uri=<uri>

Before fetching from the remote, fetch a bundle from the given
<uri> and unbundle the data into the local repository. The refs
in the bundle will be stored under the hidden refs/bundle/*
namespace. This option is incompatible with --depth,
--shallow-since, and --shallow-exclude.

When you create a repository on GitHub.com, it exists as a remote repository. You can clone your repository to create a local copy on your computer and sync between the two locations.

About cloning a repository

You can clone a repository from GitHub.com to your local computer, or to a codespace, to make it easier to fix merge conflicts, add or remove files, and push larger commits. When you clone a repository, you copy the repository from GitHub.com to your local machine, or to a remote virtual machine when you create a codespace. For more information about cloning to a codespace, see «Creating a codespace for a repository.»

You can clone a repository from GitHub.com to your local computer to make it easier to fix merge conflicts, add or remove files, and push larger commits. When you clone a repository, you copy the repository from GitHub.com to your local machine.

You can clone a repository from GitHub.com to your local computer to make it easier to fix merge conflicts, add or remove files, and push larger commits. When you clone a repository, you copy the repository from GitHub.com to your local machine.

Cloning a repository pulls down a full copy of all the repository data that GitHub.com has at that point in time, including all versions of every file and folder for the project. You can push your changes to the remote repository on GitHub.com, or pull other people’s changes from GitHub.com. For more information, see «Using Git».

You can clone your existing repository or clone another person’s existing repository to contribute to a project.

Cloning a repository

Cloning an empty repository

An empty repository contains no files. It’s often made if you don’t initialize the repository with a README when creating it.

  1. On GitHub.com, navigate to the main page of the repository.

  2. To clone your repository using the command line using HTTPS, under «Quick setup», click . To clone the repository using an SSH key, including a certificate issued by your organization’s SSH certificate authority, click SSH, then click .

    Screenshot of the quick setup instructions for an empty repository. To the right of the HTTPS URL for the repository, a copy icon is outlined in dark orange.

    Alternatively, to clone your repository in Desktop, click Set up in Desktop and follow the prompts to complete the clone.

    Screenshot of the quick setup instructions for an empty repository. A button, labeled with a download icon and "Set up in Desktop," is outlined in dark orange.

  3. Open TerminalTerminalGit Bash.

  4. Change the current working directory to the location where you want the cloned directory.

  5. Type git clone, and then paste the URL you copied earlier.

    git clone https://github.com/YOUR-USERNAME/YOUR-REPOSITORY
    
  6. Press Enter to create your local clone.

    $ git clone https://github.com/YOUR-USERNAME/YOUR-REPOSITORY
    > Cloning into `Spoon-Knife`...
    > remote: Counting objects: 10, done.
    > remote: Compressing objects: 100% (8/8), done.
    > remove: Total 10 (delta 1), reused 10 (delta 1)
    > Unpacking objects: 100% (10/10), done.
    

Troubleshooting cloning errors

When cloning a repository it’s possible that you might encounter some errors.

If you’re unable to clone a repository, check that:

  • You can connect using HTTPS. For more information, see «Troubleshooting cloning errors.»
  • You have permission to access the repository you want to clone. For more information, see «Troubleshooting cloning errors.»
  • The default branch you want to clone still exists. For more information, see «Troubleshooting cloning errors.»

Further reading

  • «Troubleshooting connectivity problems»

Как в git клонировать репозиторий в текущую папку, т.е. без создания папки с именем репозитория?

Пробовал вот так: git clone https://user@bitbucket.org/user/rep.git .
Не получается. Может, есть какой-нибудь способ?


  • Вопрос задан

  • 59395 просмотров

Пригласить эксперта

ваша команда верна, но она может не работать, если директория не пуста, git не позволяет клонировать в непустую директорию

Не может быть, чтобы не получалось! Точку же ставите?

Точка ставится через пробел, и в директории ничего не должно быть.

У меня вопрос:
Хочу клонировать репозиторий, ввожу логин и пароль от гитхаба, а в ответ repository not found.
Что я делаю не так?


  • Показать ещё
    Загружается…

08 окт. 2023, в 23:50

5000 руб./за проект

08 окт. 2023, в 21:59

1000 руб./в час

08 окт. 2023, в 20:00

10000 руб./за проект

Минуточку внимания

The most common way to clone git repository is to enter in the terminal command that
looks like something like this:

git clone https://github.com/bessarabov/my_project.git

This command will create the directory «my_project» in the current directory and it will clone
repo to that directory. Here is an example:

$ pwd
/Users/bessarabov
$ git clone https://github.com/bessarabov/my_project.git
Cloning into 'my_project'...
remote: Enumerating objects: 3, done.
remote: Counting objects: 100% (3/3), done.
remote: Total 3 (delta 0), reused 0 (delta 0), pack-reused 0
Unpacking objects: 100% (3/3), done.
$ ls -1a my_project/
.
..
.git
README.md
$

Command «pwd» prints the directory where you are now. The command «git clone …» does the clone.
And with «ls» command we check that there is a hidden «.git» directory that stores all the history
and other meta information and there is a «README.md» file.

Specify directory to clone to

Sometimes you need to place git repository in some other directory. Here is an example:

$ pwd
/Users/bessarabov
$ git clone https://github.com/bessarabov/my_project.git project
Cloning into 'project'...
remote: Enumerating objects: 3, done.
remote: Counting objects: 100% (3/3), done.
remote: Total 3 (delta 0), reused 0 (delta 0), pack-reused 0
Unpacking objects: 100% (3/3), done.
$ ls -1a project
.
..
.git
README.md
$

As you can see here I used «git clone» command with two parameters:

  • the first paramter is the url to the repo
  • the second paramter is the directory where to clone repo

Clone to the current directory

And sometimes you need to clone the git repo to the current directory. To specify
the current directory the symbol dot is used. So to clone repo to the current
directory you need to specify two parameters to git clone:

  • the url of the repo
  • just one symbol — dot — «.» — it means current directory

Here is an example:

$ mkdir the_project
$ cd the_project/
$ pwd
/Users/bessarabov/the_project
git clone https://github.com/bessarabov/my_project.git .
Cloning into '.'...
remote: Enumerating objects: 3, done.
remote: Counting objects: 100% (3/3), done.
remote: Total 3 (delta 0), reused 0 (delta 0), pack-reused 0
Unpacking objects: 100% (3/3), done.
$ ls -1a
.
..
.git
README.md
$

Here I have created a new directory with the name «the_project», then I’ve entered it
with «cd» command and did the clone with the command «git clone url .». The dot in
this command is what makes git clone to the directory where I’m now.

Error «fatal: destination path ‘.’ already exists and is not an empty directory»

Sometimes you can see error message:

$ git clone https://github.com/bessarabov/my_project.git .
fatal: destination path '.' already exists and is not an empty directory.

It means exactly what it it written in this message. You are trying to checkout
repo to the directory that has some files in it. With the command «ls» you can check
what files are in the current directory. It is also possible that there are some
hidden files, so it is better to use «-a» option to make «ls» show all files
including hidden:

$ ls -1a
.
..
.git
README.md

The «ls» command shows that git is right. The directory is not empty. There is a
directory .git and a file README.md. You can permanent delete that files with
the command «rm» (but do it only if you don’t need those files, you will not
be able to «undelete» them):

$ rm -rf .git README.md

After that the «git clone» will succeed:

$ git clone https://github.com/bessarabov/my_project.git .
Cloning into '.'...
remote: Enumerating objects: 3, done.
remote: Counting objects: 100% (3/3), done.
remote: Total 3 (delta 0), reused 0 (delta 0), pack-reused 0
Unpacking objects: 100% (3/3), done.
$

Recap

  • When you use «git clone url» the directory will be automatically created
  • You can specify what directory to create with the command «git clone url dir»
  • If you need to clone to the current directory you need to run command «git clone url .»

I’m doing:

git clone ssh://[email protected]/home/user/private/repos/project_hub.git ./

I’m getting:

Fatal: destination path ‘.’ already exists and is not an empty
directory.

I know path . already exists.
And I can assure that directory IS empty. (I do ls inside and I see nothing!)

What am I missing here in order to clone that project into the current directory ?

asked Mar 25, 2012 at 22:39

MEM's user avatar

7

simply put a dot next to it

git clone [email protected]:user/my-project.git .

From git help clone:

Cloning into an existing directory is only allowed if the directory is empty.

So make sure the directory is empty (check with ls -a), otherwise the command will fail.

mota's user avatar

mota

5,2955 gold badges34 silver badges44 bronze badges

answered Oct 8, 2013 at 9:27

Roshan Pal's user avatar

Roshan PalRoshan Pal

7,4382 gold badges13 silver badges12 bronze badges

22

The following is probably not fully equivalent to a clone in all cases but did the trick for me:

git init .
git remote add -t \* -f origin <repository-url>
git checkout master

In my case, this produces a .git/config file which is equivalent to the one I get when doing a clone.

Grigor Yosifov's user avatar

answered May 29, 2013 at 10:15

Andre Holzner's user avatar

Andre HolznerAndre Holzner

18.4k6 gold badges54 silver badges63 bronze badges

9

@Andrew has answered it clearly here. But as simple as this also works even if the directory is not empty:

git init .
git remote add origin <repository-url>
git pull origin master

Community's user avatar

answered Nov 13, 2015 at 15:06

ambes's user avatar

ambesambes

5,2724 gold badges27 silver badges36 bronze badges

1

Do

git clone https://[email protected]/user/projectname.git .

Directory must be empty

answered Oct 24, 2017 at 15:12

NSukonny's user avatar

NSukonnyNSukonny

1,09011 silver badges18 bronze badges

1

To be sure that you could clone the repo, go to any temporary directory and clone the project there:

git clone ssh://[email protected]/home/user/private/repos/project_hub.git

This will clone your stuff into a project_hub directory.

Once the cloning has finished, you could move this directory wherever you want:

mv project_hub /path/to/new/location

This is safe and doesn’t require any magical stuff around.

answered Mar 26, 2012 at 8:28

eckes's user avatar

eckeseckes

64.6k29 gold badges168 silver badges201 bronze badges

2

git clone your-repo tmp && mv tmp/.git . && rm -rf tmp && git reset --hard

answered Mar 21, 2013 at 14:02

return1.at's user avatar

return1.atreturn1.at

3,0023 gold badges23 silver badges26 bronze badges

1

Specifing the absolute current path using $(pwd) worked for me.

git clone https://github.com/me/myproject.git $(pwd)

git version: 2.21.0

Requires empty directory, as per the ticket description.


UPDATE 2022: You can now just use .

i.e.

git clone https://github.com/me/myproject.git .

git version: 2.36.1

answered Mar 31, 2019 at 14:30

Nick Grealy's user avatar

Nick GrealyNick Grealy

24.4k9 gold badges106 silver badges119 bronze badges

4

If the current directory is empty, then this will work:

git clone <repository> foo; mv foo/* foo/.git* .; rmdir foo

answered Mar 26, 2012 at 14:35

GoZoner's user avatar

GoZonerGoZoner

68.2k20 gold badges95 silver badges145 bronze badges

2

The solution was using the dot,
so:

rm -rf .* && git clone ssh://[email protected]/home/user/private/repos/project_hub.git .`

rm -rf .* && may be omitted if we are absolutely sure that the directory is empty.

Credits go to:
@James McLaughlin on comments

OneCricketeer's user avatar

OneCricketeer

181k19 gold badges134 silver badges249 bronze badges

answered Apr 12, 2013 at 7:05

MEM's user avatar

MEMMEM

30.6k42 gold badges121 silver badges191 bronze badges

5

In addition to @StephaneDelcroix’s answer, before using:

git clone [email protected]/my-project.git .

make sure that your current dir is empty by using

ls -a

answered Feb 20, 2014 at 12:29

Jakehao's user avatar

JakehaoJakehao

1,0198 silver badges15 bronze badges

2

I had this same need. In my case I had a standard web folder which is created by a web server install. For the purposes of this illustration let’s say this is

/server/webroot

and webroot contains other standard files and folders. My repo just has the site specific files (html, javascript, CFML, etc.)

All I had to do was:

cd /server/webroot

git init

git pull [url to my repo.git]

You need to be careful to do the git init in the target folder because if you do NOT one of two things will happen:

  1. The git pull will simply fail with a message about no git file, in my case:

fatal: Not a git repository (or any of the parent directories): .git

  1. If there is a .git file somewhere in the parent path to your folder your pulled repo will be created in THAT parent that contains the .git file. This happened to me and I was surprised by it ;-)

This did NOT disturb any of the «standard» files I have in my webroot folder but I did need to add them to the .gitignore file to prevent the inadvertent addition of them to subsequent commits.

This seems like an easy way to «clone» into a non-empty directory. If you don’t want the .git and .gitignore files created by the pull, just delete them after the pull.

Kukic Vladimir's user avatar

answered Aug 4, 2017 at 18:21

igeocacher's user avatar

igeocacherigeocacher

1291 silver badge2 bronze badges

I used this to clone a repo to the current directory, which wasn’t empty. Not necessarily clean living, but it was in a disposable docker container:

git clone https://github.com/myself/myRepo.git temp
cp -r temp/* .
rm -rf temp

Here, I used cp -r instead of mv, since that copies hidden files and directories. Then dispose of the temporary directory with rm -rf

answered Jun 30, 2020 at 15:05

RexBarker's user avatar

RexBarkerRexBarker

1,48616 silver badges14 bronze badges

Further improving on @phatblat’s answer:

git clone --no-checkout <repository> tmp \
  && mv tmp/.git . \
  && rmdir tmp \
  && git checkout master

as one liner:

git clone --no-checkout <repository> tmp && mv tmp/.git . && rmdir tmp && git checkout master

answered Feb 27, 2019 at 22:20

166_MMX's user avatar

166_MMX166_MMX

5905 silver badges18 bronze badges

Improving on @GoZoner’s answer:

git clone <repository> foo; shopt -s dotglob nullglob; mv foo/* .; rmdir foo

The shopt command is taken from this SO answer and changes the behavior of the ‘mv’ command on Bash to include dotfiles, which you’ll need to include the .git directory and any other hidden files.

Also note that this is only guaranteed to work as-is if the current directory (.) is empty, but it will work as long as none of the files in the cloned repo have the same name as files in the current directory. If you don’t care what’s in the current directory, you can add the -f (force) option to the ‘mv’ command.

Community's user avatar

answered Jan 3, 2013 at 4:55

phatblat's user avatar

phatblatphatblat

3,8443 gold badges34 silver badges31 bronze badges

shopt -s dotglob
git clone ssh://[email protected]/home/user/private/repos/project_hub.git tmp && mv tmp/* . && rm -rf tmp

answered Jun 15, 2017 at 16:50

John Josef's user avatar

John JosefJohn Josef

3142 silver badges5 bronze badges

2

git clone ssh://[email protected]/home/user/private/repos/project_hub.git $(pwd)

answered May 13, 2020 at 19:43

Catalin's user avatar

CatalinCatalin

1351 silver badge7 bronze badges

2

use . at the end of your command like below

git clone URL .

OneCricketeer's user avatar

OneCricketeer

181k19 gold badges134 silver badges249 bronze badges

answered Mar 22, 2017 at 8:44

Upendra's user avatar

UpendraUpendra

6836 silver badges23 bronze badges

2

Here was what I found:

I see this:

fatal: destination path 'CouchPotatoServer' already exists and is not an empty directory.

Amongst my searchings, I stumbled on to:

https://couchpota.to/forum/viewtopic.php?t=3943

Look for the entry by Clinton.Hall…
If you try this (as I did), you will probably get the access denied response, there was my 1st clue, so the initial error (for me), was actually eluding to the wrong root issue.

Solution for this in windows:
make sure you run cmd or git elevated, then run:

git clone https://github.com/RuudBurger/CouchPotatoServer.git

The above was my issue and simply elevating worked for me.

Caleb Kleveter's user avatar

answered Aug 16, 2015 at 1:27

ynotjs's user avatar

So I fixed this same error by deleting the hidden .git folder in my root directory, and then adding a period to the ‘git clone repo .’ in my root/dist folder. This is in the context of a vue-cli webpack project. So what everyone else is saying is right, it usually means you have git tracking either in the folder you are trying to clone into or in the parent folder or root of the folder in question!

answered Apr 20, 2018 at 0:16

Akin Hwan's user avatar

Akin HwanAkin Hwan

6171 gold badge9 silver badges26 bronze badges

The solution for Windows is to clone the repository to other folder and then copy and paste to the original location or just copy the .git invisible folder.

answered Feb 24, 2019 at 11:22

croppio.com's user avatar

croppio.comcroppio.com

1,8435 gold badges28 silver badges44 bronze badges

1

Removing with

rm -rf .*

may get you into trouble or some more errors.

If you have /path/to/folder, and would like to remove everything inside, but not that folder, just run:

rm -rf /path/to/folder/*

answered Jun 13, 2017 at 14:19

Sid's user avatar

it’s useful to create a new project directory by mkdir filename, then running the command of git clone xxxxx, and moving the files over

OneCricketeer's user avatar

OneCricketeer

181k19 gold badges134 silver badges249 bronze badges

answered Aug 15, 2017 at 10:14

crazier-qi's user avatar

  • Gigabyte ma770t ud3 windows 10
  • Gigabyte uefi dualbios загрузка с флешки windows 10 через биос
  • Gigabyte lan driver для windows 7
  • Git bash windows ssh key
  • Gigabyte h55m s2h драйвера windows 10